agent-base
- Version 7.1.4
 - Published
 - 31.3 kB
 - No dependencies
 - MIT license
 
Install
npm i agent-baseyarn add agent-basepnpm add agent-baseOverview
Turn a function into an `http.Agent` instance
Index
Variables
variable INTERNAL
const INTERNAL: Symbol;Functions
Classes
class Agent
abstract class Agent extends http.Agent {}constructor
constructor(opts?: http.AgentOptions);property defaultPort
defaultPort: number;property keepAlive
keepAlive: boolean;property options
options: Partial<any>;property protocol
protocol: string;method connect
abstract connect: (    req: http.ClientRequest,    options: AgentConnectOpts) => Promise<Duplex | http.Agent> | Duplex | http.Agent;method createConnection
createConnection: () => Duplex;method createSocket
createSocket: (    req: http.ClientRequest,    options: AgentConnectOpts,    cb: (err: Error | null, s?: Duplex) => void) => void;method getName
getName: (options?: AgentConnectOpts) => string;method isSecureEndpoint
isSecureEndpoint: (options?: AgentConnectOpts) => boolean;Determine whether this is an
httporhttpsrequest.
Type Aliases
type AgentConnectOpts
type AgentConnectOpts = HttpConnectOpts | HttpsConnectOpts;type ThenableRequest
type ThenableRequest = http.ClientRequest & {    then: Promise<http.IncomingMessage>['then'];};Package Files (2)
Dependencies (0)
No dependencies.
Dev Dependencies (11)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/agent-base.
- Markdown[](https://www.jsdocs.io/package/agent-base)
 - HTML<a href="https://www.jsdocs.io/package/agent-base"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
 
- Updated .
Package analyzed in 3628 ms. - Missing or incorrect documentation? Open an issue for this package.
 
