Package io.ktor.http.cio
Types
class CIOHeaders : Headers An adapter from CIO low-level headers map to ktor Headers interface |
|
class CIOMultipartDataBase : MultiPartData, CoroutineScope Represents a multipart data object that does parse and convert parts to ktor’s PartData |
|
class ConnectionOptions Represents a parsed |
|
class HttpHeadersMap A headers map data structure used in CIO |
|
abstract class HttpMessage : Closeable Represents a base HTTP message type for request and response |
|
sealed class MultipartEvent Represents a multipart content starting event. Every part need to be completely consumed or released via release |
|
class Request : HttpMessage Represents an HTTP request |
|
class RequestResponseBuilder Builds an HTTP request or response |
|
class Response : HttpMessage Represents an HTTP response |
Exceptions
class ParserException : Exception An HTTP parser exception |
Type Aliases
typealias DecoderJob = WriterJob Decoder job type |
|
typealias EncoderJob = ReaderJob Encoder job type |
|
typealias HttpRequestHandler = suspend ServerRequestScope.(request: Request) -> Unit HTTP request handler function |
Extensions for External Classes
Properties
val HTTP pipeline coroutine name |
|
val HTTP pipeline writer coroutine name |
|
val HTTP request handler coroutine name |
Functions
suspend fun boundary( Skip multipart boundary |
|
suspend fun |
|
suspend fun suspend fun decodeChunked( Chunked stream decoding loop |
|
fun HttpHeadersMap.dumpTo( Dump header values to out, useful for debugging |
|
suspend fun encodeChunked( Start chunked stream encoding coroutine suspend fun encodeChunked( Chunked stream encoding loop |
|
fun expectHttpBody( |
|
fun expectHttpUpgrade( |
|
fun expectMultipart(headers: HttpHeadersMap): Boolean Check if we have multipart content |
|
fun |
|
fun parseBoundary(contentType: CharSequence): ByteBuffer Parse multipart boundary encoded in contentType header value |
|
suspend fun parseHeaders( Parse http headers. Not applicable to request and response status lines. |
|
suspend fun parseHttpBody( Parse HTTP request or response body using contentLength, transferEncoding and connectionOptions writing it to out. Usually doesn’t fail but closing out channel with error. suspend fun parseHttpBody( Parse HTTP request or response body using request/response’s headers writing it to out. Usually doesn’t fail but closing out channel with error. |
|
fun fun fun |
|
suspend fun parsePart( Parse multipart part headers and body. Body bytes will be copied to output but up to limit bytes |
|
suspend fun parsePartBody( Parse multipart part body copying them to output channel but up to limit bytes |
|
suspend fun parsePartHeaders( Parse multipart part headers |
|
suspend fun parsePreamble( Parse a multipart preamble |
|
suspend fun parseRequest(input: ByteReadChannel): Request? Parse an HTTP request line and headers |
|
suspend fun parseResponse(input: ByteReadChannel): Response? Parse an HTTP response status line and headers |