Interface ServerResponse

Hierarchy

Index

Properties

Methods

Properties

public sendDate: boolean

public statusCode: number

public writable: boolean

Methods

public addListener(event: string, listener: Function): any

Parameters

  • event: string
  • listener: Function

Returns

any

public addListener(event: string, listener: Function): any

Parameters

  • event: string
  • listener: Function

Returns

any

public addTrailers(headers: any)

Parameters

  • headers: any

public destroy()

public destroySoon()

public emit(event: string, arg1?: any, arg2?: any)

Parameters

  • event: string
  • arg1?: any optional
  • arg2?: any optional

public emit(event: string, arg1?: any, arg2?: any)

Parameters

  • event: string
  • arg1?: any optional
  • arg2?: any optional

public end(data?: any, encoding?: string)

Parameters

  • data?: any optional
  • encoding?: string optional

public getHeader(name: string): string

Parameters

  • name: string

Returns

string

public listeners(event: string): Array<{ Function: any; }>

Parameters

  • event: string

Returns

Array<{ Function: any; }>

public listeners(event: string): Array<{ Function: any; }>

Parameters

  • event: string

Returns

Array<{ Function: any; }>

public on(event: string, listener: Function): any

Parameters

  • event: string
  • listener: Function

Returns

any

public on(event: string, listener: Function): any

Parameters

  • event: string
  • listener: Function

Returns

any

public once(event: string, listener: Function)

Parameters

  • event: string
  • listener: Function

public once(event: string, listener: Function)

Parameters

  • event: string
  • listener: Function

public removeAllListener(event: string)

Parameters

  • event: string

public removeAllListener(event: string)

Parameters

  • event: string

public removeHeader(name: string)

Parameters

  • name: string

public removeListener(event: string, listener: Function)

Parameters

  • event: string
  • listener: Function

public removeListener(event: string, listener: Function)

Parameters

  • event: string
  • listener: Function

public setHeader(name: string, value: string)

Parameters

  • name: string
  • value: string

public setMaxListeners(n: number)

Parameters

  • n: number

public setMaxListeners(n: number)

Parameters

  • n: number

public write(str: string, encoding?: string, fd?: string): boolean

Parameters

  • str: string
  • encoding?: string optional
  • fd?: string optional

Returns

boolean

public write(buffer: Buffer): boolean

Parameters

  • buffer: Buffer

Returns

boolean

public write(chunk: any, encoding?: string): any

Parameters

  • chunk: any
  • encoding?: string optional

Returns

any

public writeContinue()

public writeHead(statusCode: number, reasonPhrase?: string, headers?: any)

Parameters

  • statusCode: number
  • reasonPhrase?: string optional
  • headers?: any optional

public writeHead(statusCode: number, headers?: any)

Parameters

  • statusCode: number
  • headers?: any optional