MutableRequest

class MutableRequest(val connection: Request.Connection, var method: HttpMethod, params: Map<String, String>, queryParams: Map<String, String>, headers: Map<String, List<String>>, cookies: Map<String, String>, var body: ByteArray?, var contentType: String?) : Request(source)

Constructors

Link copied to clipboard
constructor(request: Request)
constructor(connection: Request.Connection, method: HttpMethod, params: Map<String, String>, queryParams: Map<String, String>, headers: Map<String, List<String>>, cookies: Map<String, String>, body: ByteArray?, contentType: String?)

Properties

Link copied to clipboard
open override var body: ByteArray?

An (optional) payload sent with the request. Will only potentially be set with appropriate methods that are allowed to send data, i.e. HttpMethod.POST, HttpMethod.PUT, and HttpMethod.PATCH

Link copied to clipboard
open override val connection: Request.Connection

Information about the connection that carried the request.

Link copied to clipboard
open override var contentType: String?

The content type of the body, if set and sent.

Link copied to clipboard
open override val cookies: MutableMap<String, String>

Any cookies sent with the request. Note the value of the cookies will be in a raw format, so you may need to decode them yourself.

Link copied to clipboard

All headers sent with the request.

Link copied to clipboard
open override var method: HttpMethod

The type of http method this call was sent with.

Link copied to clipboard
open override val params: MutableMap<String, String>

A list of key/value pairs extracted either from the user's query string or from any dynamic path parts.

Link copied to clipboard
open override val queryParams: MutableMap<String, String>

Like params but only for the query string, just in case a user needs to disambiguate between a dynamic path part and a query parameter with the same name.

Functions

Link copied to clipboard

Convenience method to pull body text out from a request.