Skip to content

Commit

Permalink
Add example https agent setting
Browse files Browse the repository at this point in the history
  • Loading branch information
geek committed Mar 21, 2017
1 parent 5827bb8 commit b014bb2
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ const result = Wreck.parseCacheControl('private, max-age=0, no-cache');
Object that contains the agents for pooling connections for `http` and `https`.
The properties are `http`, `https`, and `httpsAllowUnauthorized` which is an
`https` agent with `rejectUnauthorized` set to true. All agents have
`maxSockets` configured to `Infinity`. They are each instances of the node.js
`maxSockets` configured to `Infinity`. They are each instances of the Node.js
[Agent](http://nodejs.org/api/http.html#http_class_http_agent) and expose the
standard properties.

Expand All @@ -259,6 +259,18 @@ agent.
Wreck.agents.http.maxSockets = 20;
```

Below is another example that sets the certificate details for all HTTPS requests.

```js
const HTTPS = require('https');
const Wreck = require('wreck');

Wreck.agents.https = new HTTPS.Agent({
cert,
key,
ca
});
```

### Events

Expand Down

0 comments on commit b014bb2

Please sign in to comment.