https-agent
HTTPS agent for Node with transparent proxy support
Creates a HTTPS agent that automatically handles proxy tunnelling using the https_proxy
environment variable. You can then plug the agent into your HTTP client of choice and make requests using SSL client authentication.
Installation
npm install https-agent
Usage
var httpsAgent = ;var fs = ; var agent = ;
All of the standard TLS options are supported when creating an agent. Use the pfx
and passphrase
options for a certificate in PKCS12 format or the cert
and key
options for separate certificate and key files.
Examples
https.get
Usage with var httpsAgent = ;var fs = ;var https = ; var agent = ; var options = protocol: 'https:' hostname: 'www.example.com' port: 443 agent: agent https;
request
Usage withvar httpsAgent = ;var fs = ;var request = ; var agent = ; ;
node-rest-client
Usage withvar httpsAgent = ;var fs = ;var Client = Client; var agent = ; var client = connection: agent: agent ; client;