Properties
Functions
Adds a new header with the name and value. This may be used to add multiple headers with the same name. Unlike addHeader this does not validate the name and value.
Adds an HTTP 1xx response to precede this response. Note that this response's headers delay applies after this response is transmitted. Set a headers delay on that response to delay its transmission.
Sets the response body to the UTF-8 encoded bytes of body.
Sets the response body to the UTF-8 encoded bytes of body, chunked every maxChunkSize bytes.
Sets the response body to body, chunked every maxChunkSize bytes.
Removes all HTTP headers including any "Content-Length" and "Transfer-encoding" headers that were added by default.
Process the response without even attempting to reading the request body. For HTTP/2 this will close the response stream after the response body or trailers. For HTTP/1 this will close the socket after the response body or trailers.
Don't trust the client during the SSL handshake.
Sets the headers and returns this.
Configures this response to be served as a response to an HTTP CONNECT request, either for doing HTTPS through an HTTP proxy, or HTTP/2 prior knowledge through an HTTP proxy.
Trigger socketEffect while reading the request body.
Trigger socketEffect before the request headers are read.
Trigger socketEffect while writing the response body.
Trigger socketEffect after writing the response body.
Trigger socketEffect before the response headers are sent.
Removes all headers named name.
Sets the status and returns this.
Throttles the request reader and response writer to sleep for the given period after each series of bytesPerPeriod bytes are transferred. Use this to simulate network behavior.
Sets the trailers and returns this.
Attempts to perform a web socket upgrade on the connection. This will overwrite any previously set status, body, or streamHandler.