class OakRequestResponse

Examples

Create an instance of the OakRequestResponse class

const oakRequestResponse: OakRequestResponse = new OakRequestResponse(request, response);

Constructors

new
OakRequestResponse(
request: Request,
response: Response,
)

Initializes a new instance of the class with the given request and response objects.

Properties

private
_request: Request

The request object.

private
_response: Response

The response object.

readonly
request: Request

A description of the entire function.

readonly
response: Response

Retrieves the response object associated with this instance.

Methods

getRequestHeader(headerKey: string): string

Retrieves the value of the specified header from the request.

getResponseHeader(headerKey: string): string

Retrieves the value of the specified response header.

removeResponseHeader(headerKey: string): void

Removes a specific header from the response.

setResponseHeader(
headerKey: string,
headerValue: string,
): void

Sets the value of a response header.