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
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 |
|
expect class RequestResponseBuilder
Builds an HTTP request or response |
|
class Response : HttpMessage
Represents an HTTP response |
class ParserException : Exception
An HTTP parser exception |
typealias DecoderJob = WriterJob
Decoder job type |
|
typealias EncoderJob = ReaderJob
Encoder job type |
|
typealias HttpRequestHandler = suspend ServerRequestScope.(request: Request) -> Unit
HTTP request handler function |
val
HTTP pipeline coroutine name |
|
val
HTTP pipeline writer coroutine name |
|
val
HTTP request handler coroutine name |
suspend fun
Skip multipart boundary |
|
suspend fun |
|
suspend fun decodeChunked(input: ByteReadChannel, out: ByteWriteChannel): Unit
Decode chunked transfer encoding from the input channel and write the result in out. suspend fun
Chunked stream decoding loop |
|
fun HttpHeadersMap.dumpTo(indent: String, out: Appendable): Unit
Dump header values to out, useful for debugging |
|
suspend fun encodeChunked(output: ByteWriteChannel, coroutineContext: <ERROR CLASS>): EncoderJob
Start chunked stream encoding coroutine suspend fun encodeChunked(output: ByteWriteChannel, input: ByteReadChannel): Unit
Chunked stream encoding loop |
|
fun expectHttpBody(method: HttpMethod, contentLength: Long, transferEncoding: CharSequence?, connectionOptions: ConnectionOptions?, contentType: CharSequence?): Boolean fun expectHttpBody(request: Request): Boolean |
|
fun expectHttpUpgrade(method: HttpMethod, upgrade: CharSequence?, connectionOptions: ConnectionOptions?): Boolean fun expectHttpUpgrade(request: Request): Boolean |
|
fun
Check if we have multipart content |
|
fun |
|
fun
Parse multipart boundary encoded in contentType header value |
|
suspend fun parseHeaders(input: ByteReadChannel): HttpHeadersMap
Parse http headers. Not applicable to request and response status lines. |
|
suspend fun parseHttpBody(contentLength: Long, transferEncoding: CharSequence?, connectionOptions: ConnectionOptions?, input: ByteReadChannel, out: ByteWriteChannel): Unit
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(headers: HttpHeadersMap, input: ByteReadChannel, out: ByteWriteChannel): Unit
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
Parse multipart part headers and body. Body bytes will be copied to output but up to limit bytes |
|
suspend fun
Parse multipart part body copying them to output channel but up to limit bytes |
|
suspend fun
Parse multipart part headers |
|
suspend fun
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 |