Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface AgentOptions

Hierarchy

Index

Properties

Optional ca

ca: string | Buffer | string[] | Buffer[]

A string, Buffer, array of strings, or array of Buffers of trusted certificates in PEM format. If this is omitted several well known "root" CAs (like VeriSign) will be used. These are used to authorize connections.

Optional cert

cert: string | Buffer | string[] | Buffer[]

Public x509 certificate to use. Default null.

Optional ciphers

ciphers: string

A string describing the ciphers to use or exclude. Consult https://www.openssl.org/docs/apps/ciphers.html#CIPHER-LIST-FORMAT for details on the format.

Optional keepAlive

keepAlive: boolean

Keep sockets around in a pool to be used by other requests in the future. Default = false

Optional keepAliveMsecs

keepAliveMsecs: number

When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000. Only relevant if keepAlive is set to true.

Optional key

key: string | Buffer | string[] | Buffer[]

Private key to use for SSL. Default null.

Optional maxCachedSessions

maxCachedSessions: number

Optional maxFreeSockets

maxFreeSockets: number

Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256.

Optional maxSockets

maxSockets: number

Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity

Optional passphrase

passphrase: string

A string of passphrase for the private key or pfx. Default null.

Optional pfx

pfx: string | Buffer

Certificate, Private key and CA certificates to use for SSL. Default null.

Optional rejectUnauthorized

rejectUnauthorized: boolean

If true, the server certificate is verified against the list of supplied CAs. An 'error' event is emitted if verification fails. Verification happens at the connection level, before the HTTP request is sent. Default true.

Optional secureProtocol

secureProtocol: string

The SSL method to use, e.g. SSLv3_method to force SSL version 3. The possible values depend on your installation of OpenSSL and are defined in the constant SSL_METHODS.

Optional servername

servername: string

Servername for SNI (Server Name Indication) TLS extension.

Generated using TypeDoc