agent-base
- Version 7.1.3
- Published
- 31.5 kB
- No dependencies
- MIT license
Install
npm i agent-base
yarn add agent-base
pnpm add agent-base
Overview
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
http
orhttps
request.
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[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](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 3501 ms. - Missing or incorrect documentation? Open an issue for this package.