README.md in ezclient-1.5.1 vs README.md in ezclient-1.6.0
- old
+ new
@@ -33,20 +33,21 @@
Valid client options are:
- `api_auth` – arguments for `ApiAuth.sign!` (see https://github.com/mgomes/api_auth)
- `basic_auth` – arguments for basic authentication (either a hash with `:user` and `:pass` keys or a two-element array)
+- `cookies` – a hash of cookies (or `HTTP::CookieJar` object) for requests
- `headers` – a hash of headers for requests
- `keep_alive` – timeout for persistent connection in seconds
- `max_retries` – maximum number of retries in case `retry_exceptions` option is provided
- `on_complete` – callback called on request completion
- `on_error` – callback called on request exception
- `on_retry` – callback called on request retry
- `retry_exceptions` – an array of exception classes to retry
- `ssl_context` – ssl context for requests (an `OpenSSL::SSL::SSLContext` instance)
- `timeout` – timeout for requests in seconds or hash like `{ read: 5, write: 5, connect: 1 }`
-- `follow` - enable following redirects (`true` or hash with options – e.g. `{ max_hops: 1, strict: false}`)
+- `follow` – enable following redirects (`true` or hash with options – e.g. `{ max_hops: 1, strict: false}`)
All these options are passed to each request made by this client but can be overriden on per-request basis.
Extra per-request only options are:
@@ -116,9 +117,10 @@
request.verb # => "POST"
request.url # => "http://example.com"
request.body # => '{"a": 1}'
request.headers # => { "Content-Type" => "application/json; charset=UTF-8", ... }
+request.elapsed_seconds # => 0.08117745001072763
```
## Response object
```ruby