PipelineRequest

A client's request that is used in ApplicationPlugin. To learn how to handle incoming requests, see Handling requests.

See also

Inheritors

Properties

Link copied to clipboard
abstract override val call: PipelineCall

An PipelineCall instance this PipelineRequest is attached to.

Link copied to clipboard
abstract val cookies: RequestCookies

Provides access to cookies for this request.

Link copied to clipboard
abstract val headers: Headers

Provides access to headers for the current request. You can also get access to specific headers using dedicated extension functions, such as acceptEncoding, contentType, cacheControl, and so on.

Link copied to clipboard

Gets a request HTTP method possibly overridden using the X-Http-Method-Override header.

Link copied to clipboard

Gets a request's HTTP version.

Link copied to clipboard

Provides access to connection details such as a host name, port, scheme, etc. To get information about a request passed through an HTTP proxy or a load balancer, install the ForwardedHeaders/XForwardedHeader plugin and use the origin property.

Link copied to clipboard

Represents request and connection parameters possibly overridden via https headers. By default, it fallbacks to ApplicationRequest.local

Link copied to clipboard

A pipeline for receiving content.

Link copied to clipboard

Provides access to decoded parameters of a URL query string.

Link copied to clipboard

Provides access to parameters of a URL query string.

Link copied to clipboard

Gets a request's URI, including a query string.

Functions

Link copied to clipboard

Get a request's Accept header value.

Link copied to clipboard

Gets a request's Accept-Charset header value.

Link copied to clipboard

Gets the Accept-Charset header charsets sorted according to their qualities.

Link copied to clipboard

Gets a request's Accept-Encoding header value.

Link copied to clipboard

Gets the Accept-Encoding header encoding types sorted according to their qualities.

Link copied to clipboard

Gets the Accept header content types sorted according to their qualities.

Link copied to clipboard

Gets a request's Accept-Language header value.

Link copied to clipboard

Gets the Accept-Language header languages sorted according to their qualities.

Link copied to clipboard

Get a request's Authorization header value.

Link copied to clipboard

Gets a request's Cache-Control header value.

Link copied to clipboard

Gets a request's charset.

Link copied to clipboard

Gets a request's Content-Length header value.

Link copied to clipboard

Gets a request's content type or returns ContentType.Any.

Link copied to clipboard

A document name is a substring after the last slash but before a query string.

Link copied to clipboard

Internal helper function to encode raw parameters. Should not be used directly.

Link copied to clipboard

Gets the first value of a name header or returns null if missing.

Link copied to clipboard

Gets a request's host value without a port.

Link copied to clipboard

Checks whether a request's body is chunk-encoded.

Link copied to clipboard

Checks whether a request body is multipart-encoded.

Link copied to clipboard

Get a request's Location header value.

Link copied to clipboard

Get a request's URL path without a query string.

Link copied to clipboard

Gets a request's port extracted from the Host header value.

Link copied to clipboard

Gets a request's query string or returns an empty string if missing.

Link copied to clipboard

Gets ranges parsed from a request's Range header value.

Link copied to clipboard

Receives a raw body payload as a channel.

Link copied to clipboard
abstract fun setHeader(name: String, values: List<String>?)

Overrides request headers. Will remove header name if passed values is null or set values otherwise.

Link copied to clipboard
abstract fun setReceiveChannel(channel: ByteReadChannel)

Overrides request body. It's a caller responsibility to close the original channel if it's not needed.

Link copied to clipboard

Generates a string representing this ApplicationRequest suitable for logging

Link copied to clipboard

Gets a request's User-Agent header value.