Skip to content

Commit

Permalink
Add info about proxy support
Browse files Browse the repository at this point in the history
Closes #83
  • Loading branch information
ixti committed Feb 18, 2014
1 parent 9e1a966 commit 5e8d1c2
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5e8d1c2

Please sign in to comment.