Skip to main content

PoHttpServerResponse

The HTTP server response.

Methods​

finish(): void​

v0.42.0

Finishes the HTTP response.

finish(data: string): void​

v0.42.0

Finishes the HTTP response with the given data as body.

write(data: string): void​

v0.42.0

Writes data to the HTTP response body.

writeHeader(key: string, value: string): void​

v0.42.0

writeStatus(status: string): void​

v0.42.0

Writes status as the HTTP status for the response.

Example​

res:writeStatus("200 OK")