From 4f1bc2109bce59d74ec43d2e2a37150d7c77010d Mon Sep 17 00:00:00 2001 From: Andy Brody Date: Sun, 13 Sep 2015 14:18:30 -0700 Subject: [PATCH] Add docs to the README about cookies & proxies. --- README.rdoc | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.rdoc b/README.rdoc index 8ce9192..8506313 100644 --- a/README.rdoc +++ b/README.rdoc @@ -304,6 +304,20 @@ use whatever proxy the system is configured to use: RestClient.proxy = ENV['http_proxy'] +New in 2.0: Specify a per-request proxy by passing the :proxy option to +RestClient::Request. This will override any proxies set by environment variable +or by the global RestClient.proxy value. + + RestClient::Request.execute(method: :get, url: 'http://example.com', + proxy: 'http://proxy.example.com') + # => single request proxied through the proxy + +This can be used to disable the use of a proxy for a particular request. + + RestClient.proxy = "http://proxy.example.com/" + RestClient::Request.execute(method: :get, url: 'http://example.com', proxy: nil) + # => single request sent without a proxy + == Query parameters Request objects know about query parameters and will automatically add them to @@ -342,6 +356,15 @@ extract and set headers for them as needed: ) # ...response body +=== Full cookie jar support (new in 1.8) + +The original cookie implementation was very naive and ignored most of the +cookie RFC standards. +New in 1.8: An HTTP::CookieJar of cookies + +Response objects now carry a cookie_jar method that exposes an HTTP::CookieJar +of cookies, which supports full standards compliant behavior. + == SSL/TLS support Various options are supported for configuring rest-client's TLS settings. By