Scoop API

scoop:scoop.http.server:0.1.0

HttpResult

class HttpResult

source · line 36
public
public class HttpResult internal constructor(
    /** The final response status, 200 through 599 or 101 for an explicit WebSocket upgrade. */
    public val status: UInt = 200U,
    fields: List<HttpField> = ArrayList<HttpField>(),
    /** The response content, executed within the request scope. */
    public val body: HttpBody = HttpBody.Empty,
    /** Whether an installed compression policy may dynamically transform this representation. */
    public val allowCompression: Boolean = true
)

An immutable ordinary response description; it does not own an already-open source.

Extensions

property allowCompression

source · line 43
public
public val allowCompression: Boolean = true

get: public read-only

Whether an installed compression policy may dynamically transform this representation.

property status

source · line 38
public
public val status: UInt = 200U

get: public read-only

The final response status, 200 through 599 or 101 for an explicit WebSocket upgrade.

property body

source · line 41
public
public val body: HttpBody = HttpBody.Empty

get: public read-only

The response content, executed within the request scope.

property fields

source · line 46
public
public val fields: Array<HttpField>

get: public read-only

Ordered response fields, including independently preserved Set-Cookie entries.