Permalink
Browse files

Add info about proxy support

Closes #83
  • Loading branch information...
1 parent 9e1a966 commit 5e8d1c238822ebf265b212d91a4382f3a6ed8f66 @ixti ixti committed Feb 18, 2014
Showing with 20 additions and 0 deletions.
  1. +20 −0 README.md
View
@@ -121,6 +121,25 @@ HTTP.post "http://example.com/resource", :body => JSON.dump(:foo => '42')
It's easy!
+
+### Proxy Support
+
+Making request behind proxy is as simple as making them directly. Just specify
+hostname (or IP address) of your proxy server and it's port, and here you go:
+
+```ruby
+HTTP.via("proxy-hostname.local", 8080)
+ .get "http://example.com/resource"
+```
+
+Proxy needs authentication? No problem:
+
+```ruby
+HTTP.via("proxy-hostname.local", 8080, "username", "password")
+ .get "http://example.com/resource"
+```
+
+
### Adding Headers
The HTTP gem uses the concept of chaining to simplify requests. Let's say
@@ -171,6 +190,7 @@ HTTP.accept('application/json').
This adds the appropriate Accept header for retrieving a JSON response for the
given resource.
+
### Celluloid::IO Support
The HTTP Gem makes it simple to make multiple concurrent HTTP requests from a

0 comments on commit 5e8d1c2

Please sign in to comment.