Skip to main content

on

method ClientRequest.prototype.on
Jump to headingClientRequest.prototype.on(
event: "abort",
listener: () => void,
): this

Parameters Jump to heading

Jump to headingevent: "abort"
Jump to headinglistener: () => void

Return Type Jump to heading

this
Jump to headingClientRequest.prototype.on(
event: "connect",
listener: (
response: IncomingMessage,
socket: Socket,
head: Buffer,
) => void
,
): this

Parameters Jump to heading

Jump to headingevent: "connect"
Jump to headinglistener: (
response: IncomingMessage,
socket: Socket,
head: Buffer,
) => void

Return Type Jump to heading

this
Jump to headingClientRequest.prototype.on(
event: "continue",
listener: () => void,
): this

Parameters Jump to heading

Jump to headingevent: "continue"
Jump to headinglistener: () => void

Return Type Jump to heading

this
Jump to headingClientRequest.prototype.on(
event: "information",
listener: (info: InformationEvent) => void,
): this

Parameters Jump to heading

Jump to headingevent: "information"
Jump to headinglistener: (info: InformationEvent) => void

Return Type Jump to heading

this
Jump to headingClientRequest.prototype.on(
event: "response",
listener: (response: IncomingMessage) => void,
): this

Parameters Jump to heading

Jump to headingevent: "response"
Jump to headinglistener: (response: IncomingMessage) => void

Return Type Jump to heading

this
Jump to headingClientRequest.prototype.on(
event: "socket",
listener: (socket: Socket) => void,
): this

Parameters Jump to heading

Jump to headingevent: "socket"
Jump to headinglistener: (socket: Socket) => void

Return Type Jump to heading

this
Jump to headingClientRequest.prototype.on(
event: "timeout",
listener: () => void,
): this

Parameters Jump to heading

Jump to headingevent: "timeout"
Jump to headinglistener: () => void

Return Type Jump to heading

this
Jump to headingClientRequest.prototype.on(
event: "upgrade",
listener: (
response: IncomingMessage,
socket: Socket,
head: Buffer,
) => void
,
): this

Parameters Jump to heading

Jump to headingevent: "upgrade"
Jump to headinglistener: (
response: IncomingMessage,
socket: Socket,
head: Buffer,
) => void

Return Type Jump to heading

this
Jump to headingClientRequest.prototype.on(
event: "close",
listener: () => void,
): this

Parameters Jump to heading

Jump to headingevent: "close"
Jump to headinglistener: () => void

Return Type Jump to heading

this
Jump to headingClientRequest.prototype.on(
event: "drain",
listener: () => void,
): this

Parameters Jump to heading

Jump to headingevent: "drain"
Jump to headinglistener: () => void

Return Type Jump to heading

this
Jump to headingClientRequest.prototype.on(
event: "error",
listener: (err: Error) => void,
): this

Parameters Jump to heading

Jump to headingevent: "error"
Jump to headinglistener: (err: Error) => void

Return Type Jump to heading

this
Jump to headingClientRequest.prototype.on(
event: "finish",
listener: () => void,
): this

Parameters Jump to heading

Jump to headingevent: "finish"
Jump to headinglistener: () => void

Return Type Jump to heading

this
Jump to headingClientRequest.prototype.on(
event: "pipe",
listener: (src: stream.Readable) => void,
): this

Parameters Jump to heading

Jump to headingevent: "pipe"
Jump to headinglistener: (src: stream.Readable) => void

Return Type Jump to heading

this
Jump to headingClientRequest.prototype.on(
event: "unpipe",
listener: (src: stream.Readable) => void,
): this

Parameters Jump to heading

Jump to headingevent: "unpipe"
Jump to headinglistener: (src: stream.Readable) => void

Return Type Jump to heading

this
Jump to headingClientRequest.prototype.on(
event: string | symbol,
listener: (...args: any[]) => void,
): this

Parameters Jump to heading

Jump to headingevent: string | symbol
Jump to headinglistener: (...args: any[]) => void

Return Type Jump to heading

this
Back to top