ApplicationRequest

interface ApplicationRequest

Represents client's request

Functions

Link copied to clipboard
abstract fun receiveChannel(): ByteReadChannel

Request's body channel (for content only)

Properties

Link copied to clipboard
abstract val call: ApplicationCall

ApplicationCall instance this ApplicationRequest is attached to

Link copied to clipboard
abstract val cookies: RequestCookies

Cookies for this request

Link copied to clipboard
abstract val headers: Headers

Headers for this request

Link copied to clipboard
abstract val local: RequestConnectionPoint

Contains http request and connection details such as a host name used to connect, port, scheme and so on. No proxy headers could affect it. Use ApplicationRequest.origin if you need override headers support

Link copied to clipboard
abstract val pipeline: ApplicationReceivePipeline

Pipeline for receiving content

Link copied to clipboard
abstract val queryParameters: Parameters

Parameters provided in an URL

Inheritors

Link copied to clipboard

Extensions

Link copied to clipboard
fun ApplicationRequest.accept(): String?

Request's Accept header value

Link copied to clipboard
fun ApplicationRequest.acceptCharset(): String?

Request's Accept-Charset header value

Link copied to clipboard
fun ApplicationRequest.acceptCharsetItems(): List<HeaderValue>

Parsed and sorted request's Accept-Charset header value

Link copied to clipboard
fun ApplicationRequest.acceptEncoding(): String?

Request's Accept-Encoding header value

Link copied to clipboard
fun ApplicationRequest.acceptEncodingItems(): List<HeaderValue>

Parsed and sorted request's Accept-Encoding header value

Link copied to clipboard
fun ApplicationRequest.acceptItems(): List<HeaderValue>

Parsed request's Accept header and sorted according to quality

Link copied to clipboard
fun ApplicationRequest.acceptLanguage(): String?

Request's Accept-Language header value

Link copied to clipboard
fun ApplicationRequest.acceptLanguageItems(): List<HeaderValue>

Parsed and sorted request's Accept-Language header value

Link copied to clipboard
fun ApplicationRequest.authorization(): String?

Request authorization header value

Link copied to clipboard
fun ApplicationRequest.cacheControl(): String?

Request's Cache-Control header value

Link copied to clipboard
fun ApplicationRequest.contentCharset(): Charset?

Request's charset

Link copied to clipboard
fun ApplicationRequest.contentType(): ContentType

Request's content type or ContentType.Any

Link copied to clipboard
fun ApplicationRequest.document(): String

Request's document name (substring after the last slash but before query string)

Link copied to clipboard
fun ApplicationRequest.header(name: String): String?

First header value for header with name or null if missing

Link copied to clipboard
fun ApplicationRequest.host(): String

Request's host without port

Link copied to clipboard
val ApplicationRequest.httpMethod: HttpMethod

Returns request HTTP method possibly overridden via header X-Http-Method-Override

Link copied to clipboard
val ApplicationRequest.httpVersion: String

Request's HTTP version

Link copied to clipboard
fun ApplicationRequest.isChunked(): Boolean

Check if request's body is chunk-encoded

Link copied to clipboard
fun ApplicationRequest.isMultipart(): Boolean

Check if request body is multipart-encoded

Link copied to clipboard
fun ApplicationRequest.location(): String?

Request's Location header value

Link copied to clipboard
val ApplicationRequest.origin: RequestConnectionPoint

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

Link copied to clipboard
fun ApplicationRequest.path(): String

Request's path without query string

Link copied to clipboard
fun ApplicationRequest.port(): Int

Request's port extracted from Host header value

Link copied to clipboard
fun ApplicationRequest.queryString(): String

Request's query string or empty string if missing

Link copied to clipboard
fun ApplicationRequest.ranges(): RangesSpecifier?

Parsed request's Range header value

Link copied to clipboard
fun ApplicationRequest.toLogString(): String

Generates a string representing this ApplicationRequest suitable for logging

Link copied to clipboard
val ApplicationRequest.uri: String

Request's URI (including query string)

Link copied to clipboard
fun ApplicationRequest.userAgent(): String?

Request's User-Agent header value