Skip to content

Commit

Permalink
Document how to use custom CA in README (#1229)
Browse files Browse the repository at this point in the history
  • Loading branch information
hypesystem committed Oct 30, 2014
1 parent 9c77859 commit c11717e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Expand Up @@ -466,6 +466,17 @@ request.get({
});
```
It is possible to allow a custom certificate authority (CA), by specifying the contents of the certificate-file as `ca`:
```javascript
request.get({
url: 'https://api.some-server.com/',
agentOptions: {
'ca': fs.readFileSync("ca.cert.pem")
}
});
```
## request(options, callback)
The first argument can be either a `url` or an `options` object. The only required option is `uri`; all others are optional.
Expand Down

0 comments on commit c11717e

Please sign in to comment.