tiny_http_client 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -4
- data/lib/tiny_http_client.rb +2 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b4c0ce2427cb373cd438537e99d0e4ef28f8ff0
|
4
|
+
data.tar.gz: cabe3f18fbd4383b2a3c1d62ea227135e671da6a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 409b5de968df5b1d56ccd79d60a1356e758559056a4e6669c8527103944d5fad4718e181f6a52d86c7d24b4d5d599e106710ef23791d8509fd0cc00b284d6c86
|
7
|
+
data.tar.gz: 659b608f05937c37873ef347f7a1ff82499074ed112933813f9c1745b31b74daecb601f39985398af278e58c8221aa6dfcfc22bd98eba590513a52e5efd3779a
|
data/README.md
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
# Tiny HTTP Client
|
2
2
|
|
3
|
-
A really simple http client
|
3
|
+
A really simple http client:
|
4
|
+
|
5
|
+
1. Get content by url
|
6
|
+
2. Follow redirect like your browser did
|
7
|
+
3. Raise error otherwise
|
8
|
+
|
9
|
+
## Examples:
|
4
10
|
|
5
11
|
```ruby
|
6
12
|
|
@@ -8,7 +14,7 @@ html_content = TinyHttpClient.get("http://www.google.com")
|
|
8
14
|
|
9
15
|
```
|
10
16
|
|
11
|
-
|
17
|
+
add basic auth
|
12
18
|
|
13
19
|
```ruby
|
14
20
|
|
@@ -17,5 +23,3 @@ html_content = TinyHttpClient.get("http://www.google.com") do |req|
|
|
17
23
|
end
|
18
24
|
|
19
25
|
```
|
20
|
-
|
21
|
-
You'll get error when the response is not Net::HTTPSuccess.
|
data/lib/tiny_http_client.rb
CHANGED