Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add info about proxy support

Closes #83
  • Loading branch information...
commit 5e8d1c238822ebf265b212d91a4382f3a6ed8f66 1 parent 9e1a966
@ixti ixti authored
Showing with 20 additions and 0 deletions.
  1. +20 −0 README.md
View
20 README.md
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.