ClientRequest | typescript
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Implements

Index

Constructors

constructor

Properties

writable

writable: boolean

Static defaultMaxListeners

defaultMaxListeners: number

Methods

_write

  • _write(chunk: any, encoding: string, callback: Function): void
  • Parameters

    • chunk: any
    • encoding: string
    • callback: Function

    Returns void

abort

  • abort(): void
  • Returns void

addListener

  • addListener(event: string, listener: Function): this
  • addListener(event: "close", listener: function): this
  • addListener(event: "drain", listener: function): this
  • addListener(event: "error", listener: function): this
  • addListener(event: "finish", listener: function): this
  • addListener(event: "pipe", listener: function): this
  • addListener(event: "unpipe", listener: function): this
  • Event emitter The defined events on documents including:

    1. close
    2. drain
    3. error
    4. finish
    5. pipe
    6. unpipe

    Parameters

    • event: string
    • listener: Function

    Returns this

  • Parameters

    • event: "close"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • event: "drain"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • event: "error"
    • listener: function
        • (err: Error): void
        • Parameters

          • err: Error

          Returns void

    Returns this

  • Parameters

    • event: "finish"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • event: "pipe"
    • listener: function

    Returns this

  • Parameters

    • event: "unpipe"
    • listener: function

    Returns this

addTrailers

  • addTrailers(headers: any): void
  • Parameters

    • headers: any

    Returns void

emit

  • emit(event: string | symbol, ...args: any[]): boolean
  • emit(event: "close"): boolean
  • emit(event: "drain", chunk: Buffer | string): boolean
  • emit(event: "error", err: Error): boolean
  • emit(event: "finish"): boolean
  • emit(event: "pipe", src: Readable): boolean
  • emit(event: "unpipe", src: Readable): boolean
  • Parameters

    • event: string | symbol
    • Rest ...args: any[]

    Returns boolean

  • Parameters

    • event: "close"

    Returns boolean

  • Parameters

    • event: "drain"
    • chunk: Buffer | string

    Returns boolean

  • Parameters

    • event: "error"
    • err: Error

    Returns boolean

  • Parameters

    • event: "finish"

    Returns boolean

  • Parameters

    Returns boolean

  • Parameters

    Returns boolean

end

  • end(): void
  • end(buffer: Buffer, cb?: Function): void
  • end(str: string, cb?: Function): void
  • end(str: string, encoding?: string, cb?: Function): void
  • end(data?: any, encoding?: string): void
  • Returns void

  • Parameters

    • buffer: Buffer
    • Optional cb: Function

    Returns void

  • Parameters

    • str: string
    • Optional cb: Function

    Returns void

  • Parameters

    • str: string
    • Optional encoding: string
    • Optional cb: Function

    Returns void

  • Parameters

    • Optional data: any
    • Optional encoding: string

    Returns void

eventNames

  • eventNames(): (string | symbol)[]

getHeader

  • getHeader(name: string): string
  • Parameters

    • name: string

    Returns string

getMaxListeners

  • getMaxListeners(): number

listenerCount

  • listenerCount(type: string | symbol): number

listeners

  • listeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

on

  • on(event: string, listener: Function): this
  • on(event: "close", listener: function): this
  • on(event: "drain", listener: function): this
  • on(event: "error", listener: function): this
  • on(event: "finish", listener: function): this
  • on(event: "pipe", listener: function): this
  • on(event: "unpipe", listener: function): this
  • Parameters

    • event: string
    • listener: Function

    Returns this

  • Parameters

    • event: "close"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • event: "drain"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • event: "error"
    • listener: function
        • (err: Error): void
        • Parameters

          • err: Error

          Returns void

    Returns this

  • Parameters

    • event: "finish"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • event: "pipe"
    • listener: function

    Returns this

  • Parameters

    • event: "unpipe"
    • listener: function

    Returns this

once

  • once(event: string, listener: Function): this
  • once(event: "close", listener: function): this
  • once(event: "drain", listener: function): this
  • once(event: "error", listener: function): this
  • once(event: "finish", listener: function): this
  • once(event: "pipe", listener: function): this
  • once(event: "unpipe", listener: function): this
  • Parameters

    • event: string
    • listener: Function

    Returns this

  • Parameters

    • event: "close"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • event: "drain"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • event: "error"
    • listener: function
        • (err: Error): void
        • Parameters

          • err: Error

          Returns void

    Returns this

  • Parameters

    • event: "finish"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • event: "pipe"
    • listener: function

    Returns this

  • Parameters

    • event: "unpipe"
    • listener: function

    Returns this

pipe

  • pipe<T>(destination: T, options?: object): T
  • Type parameters

    Parameters

    • destination: T
    • Optional options: object
      • Optional end?: boolean

    Returns T

prependListener

  • prependListener(event: string, listener: Function): this
  • prependListener(event: "close", listener: function): this
  • prependListener(event: "drain", listener: function): this
  • prependListener(event: "error", listener: function): this
  • prependListener(event: "finish", listener: function): this
  • prependListener(event: "pipe", listener: function): this
  • prependListener(event: "unpipe", listener: function): this

prependOnceListener

  • prependOnceListener(event: string, listener: Function): this
  • prependOnceListener(event: "close", listener: function): this
  • prependOnceListener(event: "drain", listener: function): this
  • prependOnceListener(event: "error", listener: function): this
  • prependOnceListener(event: "finish", listener: function): this
  • prependOnceListener(event: "pipe", listener: function): this
  • prependOnceListener(event: "unpipe", listener: function): this

removeAllListeners

  • removeAllListeners(event?: string | symbol): this

removeHeader

  • removeHeader(name: string): void
  • Parameters

    • name: string

    Returns void

removeListener

  • removeListener(event: string, listener: Function): this
  • removeListener(event: "close", listener: function): this
  • removeListener(event: "drain", listener: function): this
  • removeListener(event: "error", listener: function): this
  • removeListener(event: "finish", listener: function): this
  • removeListener(event: "pipe", listener: function): this
  • removeListener(event: "unpipe", listener: function): this
  • Parameters

    • event: string
    • listener: Function

    Returns this

  • Parameters

    • event: "close"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • event: "drain"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • event: "error"
    • listener: function
        • (err: Error): void
        • Parameters

          • err: Error

          Returns void

    Returns this

  • Parameters

    • event: "finish"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • event: "pipe"
    • listener: function

    Returns this

  • Parameters

    • event: "unpipe"
    • listener: function

    Returns this

setDefaultEncoding

  • setDefaultEncoding(encoding: string): this
  • Parameters

    • encoding: string

    Returns this

setHeader

  • setHeader(name: string, value: string | string[]): void
  • Parameters

    • name: string
    • value: string | string[]

    Returns void

setMaxListeners

  • setMaxListeners(n: number): this

setNoDelay

  • setNoDelay(noDelay?: boolean): void
  • Parameters

    • Optional noDelay: boolean

    Returns void

setSocketKeepAlive

  • setSocketKeepAlive(enable?: boolean, initialDelay?: number): void
  • Parameters

    • Optional enable: boolean
    • Optional initialDelay: number

    Returns void

setTimeout

  • setTimeout(timeout: number, callback?: Function): void
  • Parameters

    • timeout: number
    • Optional callback: Function

    Returns void

write

  • write(buffer: Buffer): boolean
  • write(buffer: Buffer, cb?: Function): boolean
  • write(str: string, cb?: Function): boolean
  • write(str: string, encoding?: string, cb?: Function): boolean
  • write(str: string, encoding?: string, fd?: string): boolean
  • write(chunk: any, encoding?: string): void
  • Parameters

    Returns boolean

  • Parameters

    • buffer: Buffer
    • Optional cb: Function

    Returns boolean

  • Parameters

    • str: string
    • Optional cb: Function

    Returns boolean

  • Parameters

    • str: string
    • Optional encoding: string
    • Optional cb: Function

    Returns boolean

  • Parameters

    • str: string
    • Optional encoding: string
    • Optional fd: string

    Returns boolean

  • Parameters

    • chunk: any
    • Optional encoding: string

    Returns void

Static listenerCount

  • listenerCount(emitter: EventEmitter, event: string | symbol): number
  • Parameters

    Returns number

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc