ExpressResponseAPI

Express Response API

Defines methods available on an Express Response object; these are mixed into the standard HttpResponse so that guests may specify responses using this API.

Inheritors

Functions

Link copied to clipboard
abstract fun append(name: String, value: String? = null)

Append a header to the response; this method is exported to guest code.

Link copied to clipboard
abstract fun end()

Exported method allowing guest code to end the request/response cycle; equivalent to calling send.

Link copied to clipboard
abstract fun get(name: String): String?

Get a header from the response; this method is exported to guest code.

Link copied to clipboard
abstract fun send(status: Int, body: PolyglotValue?)

Exported method allowing guest code to send a response to the client with the given status code and body.

Link copied to clipboard
abstract fun set(name: String, value: String? = null)

Set a header to the response; this method is exported to guest code.

Link copied to clipboard
abstract fun status(status: Int)

Exported method allowing guest code to set the response status code.