Scoop API

scoop:scoop.http.server:0.1.0

HttpRequestBody

class HttpRequestBody

source · line 9
public
public class HttpRequestBody internal constructor(
    source: AsyncByteSource,
    limit: Long? = Some(8388608L),
    private val fields: Array<HttpField> = [],
    /** The server-configured default limit used by aggregate helpers. */
    public val bufferedBodyLimit: Long = 2097152L
)

A request body with one explicit consumption path and bounded input and decoding.

function bytes

source · line 46
public
public suspend fun bytes(maxBytes: Long = bufferedBodyLimit): Array<Byte>

Reads one complete body into a bounded independent snapshot.

function setLimit

source · line 41
public
public fun setLimit(maxBytes: Long?): Unit

Overrides the encoded input limit before selecting a consumption path; None disables it.

function text

source · line 56
public
public suspend fun text(maxBytes: Long = bufferedBodyLimit): String

Reads a complete, bounded, strictly UTF-8 request body.

property bufferedBodyLimit

source · line 14
public
public val bufferedBodyLimit: Long = 2097152L

get: public read-only

The server-configured default limit used by aggregate helpers.

function openRawStream

source · line 28
public
public fun openRawStream(): AsyncByteSource

Claims the encoded body once, bypassing any installed content decoding.