Package io.ktor.server.request

Types

Link copied to clipboard
open class ApplicationReceivePipeline(developmentMode: Boolean)

Pipeline for processing incoming content

Link copied to clipboard
class ApplicationReceiveRequest(typeInfo: <ERROR CLASS>, value: Any, reusableValue: Boolean)

Represents a subject for ApplicationReceivePipeline

Link copied to clipboard
interface ApplicationRequest

Represents client's request

Link copied to clipboard

Thrown when content cannot be transformed to the desired type.

Link copied to clipboard
class RequestAlreadyConsumedException : IllegalStateException

Thrown when a request body has already been received. Usually it is caused by double ApplicationCall.receive invocation.

Link copied to clipboard
open class RequestCookies(request: ApplicationRequest)

Server request's cookies

Functions

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<<ERROR CLASS>>

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<<ERROR CLASS>>

Parsed and sorted request's Accept-Encoding header value

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

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<<ERROR CLASS>>

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(): <ERROR CLASS>?

Request's charset

Link copied to clipboard
fun ApplicationRequest.contentType(): <ERROR CLASS>

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.encodeParameters(parameters: <ERROR CLASS>): <ERROR CLASS>

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

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
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
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(): <ERROR CLASS>?

Parsed request's Range header value

Link copied to clipboard
inline suspend fun <T : Any> ApplicationCall.receive(): T
suspend fun <T : Any> ApplicationCall.receive(typeInfo: <ERROR CLASS>): T
suspend fun <T : Any> ApplicationCall.receive(type: KClass<T>): T

Receives content for this request.

Link copied to clipboard
inline suspend fun ApplicationCall.receiveChannel(): <ERROR CLASS>

Receives channel content for this call.

Link copied to clipboard
inline suspend fun ApplicationCall.receiveMultipart(): <ERROR CLASS>

Receives multipart data for this call.

Link copied to clipboard
inline suspend fun <T : Any> ApplicationCall.receiveOrNull(): T?
suspend fun <T : Any> ApplicationCall.receiveOrNull(typeInfo: <ERROR CLASS>): T?
suspend fun <T : Any> ApplicationCall.receiveOrNull(type: KClass<T>): T?

Receives content for this request.

Link copied to clipboard
inline suspend fun ApplicationCall.receiveParameters(): <ERROR CLASS>

Receives form parameters for this call.

Link copied to clipboard
inline suspend fun ApplicationCall.receiveStream(): InputStream

Receives stream content for this call.

Link copied to clipboard
inline suspend fun ApplicationCall.receiveText(): String

Receives incoming content for this call as String.

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

Request's User-Agent header value

Properties

Link copied to clipboard
val ApplicationRequest.httpMethod: <ERROR CLASS>

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
val ApplicationRequest.uri: String

Request's URI (including query string)