class HttpResponse
source · line 60public class HttpResponse internal constructor()
Response mutations allowed before execution, with read-only completion facts afterwards.
function beforeCommit
source · line 108public fun beforeCommit(callback: (HttpResponseDraft) -> Unit): Unit
Registers a non-suspending draft callback; it runs at most once.
parameter callback
source · line 108callback: (HttpResponseDraft) -> Unit
function add
source · line 91public fun add(value: HttpField): Unit
Appends one field at response preparation, preserving duplicates.
parameter value
source · line 91value: HttpField
function remove
source · line 95public fun remove(name: String): Unit
Removes all matching fields at response preparation.
parameter name
source · line 95name: String
function set
source · line 87public fun set(value: HttpField): Unit
Replaces all occurrences of the field's name at response preparation.
parameter value
source · line 87value: HttpField
property isFinished
source · line 75public val isFinished: Boolean
get: public read-only
Whether the response body and framing finished successfully.
getter get
source · line 75get(): Boolean
property isCommitted
source · line 73public val isCommitted: Boolean
get: public read-only
Whether an irreversible final-response send has been attempted.
getter get
source · line 73get(): Boolean
property cookies
source · line 62public val cookies: ResponseCookies
get: public read-only
Appends or expires cookies as independent Set-Cookie fields.
getter get
source · line 62get(): ResponseCookies
property isAborted
source · line 77public val isAborted: Boolean
get: public read-only
Whether response execution was aborted.
getter get
source · line 77get(): Boolean
property status
source · line 79public val status: UInt?
get: public read-only
The submitted final status, or None before submission.
getter get
source · line 79get(): Option<UInt>