Home Manual Reference Source Repository
public class | source

Response

Constructor Summary

Public Constructor
public

constructor(serverResponse: http.ServerResponse)

Creates an instance of Response.

Member Summary

Public Members
public
public
public get
public set
public get
public set
public set
public get
public set

json: *

public get

json: *

public

serverResponse: http.ServerResponse

public get
public set
public get
public set

Method Summary

Public Methods
public

Writes the output data and calls http.ServerResponse#end()

public

Calls and returns the result of http.ServerResponse#write(this.body) and resets this.body back to an empty string.

Public Constructors

public constructor(serverResponse: http.ServerResponse) source

Creates an instance of Response.

Params:

NameTypeAttributeDescription
serverResponse http.ServerResponse

See:

Public Members

public [Symbol.for('body')]: string source

public [Symbol.for('response')]: * source

public get body: string source

public set body: string source

public get contentType: string source

public set contentType: string source

public set html: string source

public get html: string source

public set json: * source

public get json: * source

public serverResponse: http.ServerResponse source

public get statusCode: number source

public set statusCode: number source

public get text: string source

public set text: string source

Public Methods

public send(): boolean source

Writes the output data and calls http.ServerResponse#end()

Return:

boolean

See:

public write(): boolean source

Calls and returns the result of http.ServerResponse#write(this.body) and resets this.body back to an empty string.

Return:

boolean

See: