You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+60-4Lines changed: 60 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,14 @@
1
1
# Net::Http
2
2
3
-
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/net/http`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+
Net::HTTP provides a rich library which can be used to build HTTP
4
+
user-agents. For more details about HTTP see
5
+
[RFC2616](http://www.ietf.org/rfc/rfc2616.txt).
4
6
5
-
TODO: Delete this and the text above, and describe your gem
7
+
Net::HTTP is designed to work closely with URI. URI::HTTP#host,
8
+
URI::HTTP#port and URI::HTTP#request_uri are designed to work with
9
+
Net::HTTP.
10
+
11
+
If you are only performing a few GET requests you should try OpenURI.
6
12
7
13
## Installation
8
14
@@ -22,7 +28,57 @@ Or install it yourself as:
22
28
23
29
## Usage
24
30
25
-
TODO: Write usage instructions here
31
+
All examples assume you have loaded Net::HTTP with:
32
+
33
+
```ruby
34
+
require'net/http'
35
+
```
36
+
37
+
This will also require 'uri' so you don't need to require it separately.
38
+
39
+
The Net::HTTP methods in the following section do not persist
40
+
connections. They are not recommended if you are performing many HTTP
0 commit comments