class HttpContext
source · line 8public class HttpContext internal constructor(
/** The original request and its single-consumer body. */
public val request: HttpRequest,
internal val output: ResponseOutput,
/** The identifier supplied by the server or the caller of single-request execution. */
public val requestId: String,
/** The structured job that owns this request's work. */
public val requestJob: Job,
/** Immutable socket and negotiated protocol facts for this request. */
public val connection: HttpConnectionInfo,
private val deadline: RequestDeadline
)
One request's explicit context; it is also bound by exact type while its pipeline executes.
property pathParams
source · line 37public val pathParams: PathParameters
get: public read-only
Captured parameters for the selected endpoint or fallback group.
getter get
source · line 37get(): PathParameters
property route
source · line 35public val route: HttpRouteInfo?
get: public read-only
The selected endpoint metadata, absent before routing and for fallback results.
getter get
source · line 35get(): Option<HttpRouteInfo>
property request
source · line 10public val request: HttpRequest
get: public read-only
The original request and its single-consumer body.
property requestJob
source · line 15public val requestJob: Job
get: public read-only
The structured job that owns this request's work.
property response
source · line 21public val response: HttpResponse
get: public read-only
Pending response mutations and submitted response state.
function respond
source · line 50public suspend fun respond(result: HttpResult): Unit
Executes a final response, waiting for its producer and protocol completion.
parameter result
source · line 50result: HttpResult
property requestId
source · line 13public val requestId: String
get: public read-only
The identifier supplied by the server or the caller of single-request execution.
function setDeadline
source · line 40public fun setDeadline(duration: Duration?): Unit
Overrides the total time since pipeline entry, before commit; None disables this deadline.
parameter duration
source · line 40duration: Duration?
property connection
source · line 17public val connection: HttpConnectionInfo
get: public read-only
Immutable socket and negotiated protocol facts for this request.