Package-level declarations
Types
Link copied to clipboard
The body of a request or response.
Link copied to clipboard
Extra information about how content should be treated / displayed.
Link copied to clipboard
interface ContentSource
Interface for a body class that allows users to consume its body content.
Link copied to clipboard
Link copied to clipboard
interface Multipart
Represents all relevant information associated with a multipart request.
Link copied to clipboard
class MultipartScope
Link copied to clipboard
class MutableRequest(val connection: Request.Connection, var method: HttpMethod, params: Map<String, String>, queryParams: Map<String, String>, headers: Map<String, List<String>>, cookies: Map<String, String>, var body: Body?, val data: MutableData = MutableData()) : Request
Functions
Link copied to clipboard
Convenience method to convert a body's content into a raw byte array.
Link copied to clipboard
suspend fun Multipart.forEachPart(autoClose: Boolean = true, block: suspend MultipartScope.(Multipart.Part) -> Unit)
A convenience method that wraps Multipart.readNextPart so you don't have to collect it yourself.
Link copied to clipboard
Link copied to clipboard
Set this to a response that tells the client that the requested resource has moved to a new location.
Link copied to clipboard
Convenience method for setting the body to a text value.
Link copied to clipboard
Convert this byte source into an InputStream.
fun Body.Companion.stream(inputStream: InputStream, contentType: String = "application/octet-stream"): Body
Link copied to clipboard
suspend fun ContentSource.text(charset: Charset = contentType.parseCharsetFromContentType(), limit: Int? = null): String
Convenience method to convert a body's content into a UTF-8 string.