WebResponse interface

Represents an Express or Restify response object. This interface supports the framework and is not intended to be called directly for your code.

Properties

socket

Optional. The underlying socket.

Methods

end(any[])

When implemented in a derived class, sends a FIN packet.

send(any)

When implemented in a derived class, sends the response.

status(number)

When implemented in a derived class, sets the HTTP status code for the response.

Property Details

socket

Optional. The underlying socket.

socket?: any

Property Value

any

Method Details

end(any[])

When implemented in a derived class, sends a FIN packet.

function end(args: any[])

Parameters

args
any[]

The arguments for the end event.

Returns

any

A reference to the response object.

send(any)

When implemented in a derived class, sends the response.

function send(body: any)

Parameters

body
any

The response payload.

Returns

any

A reference to the response object.

status(number)

When implemented in a derived class, sets the HTTP status code for the response.

function status(status: number)

Parameters

status
number

The status code to use.

Returns

any

The status code.