Class
HttpContext
class HttpContext
Module: System.Web.Http
Assembly: System.Web.dll
Source file: HttpServer.rvn
Inheritance: Object → HttpContext
Implements: Disposable
Owns the combined lifetime of an accepted request and its outgoing response.
Remarks
Development API. One HTTP/1.1 exchange with headers-first request delivery. Complete snapshots the configured response and ends the exchange on success, validation/send failure or acknowledged cancellation. Close/Dispose disposes request and response content and never implicitly reads, drains or sends. Current transport closes the physical connection; this is not a keep-alive contract. Request/response objects remain readable after closure.
Properties
2 items
Request: HttpRequest
The incoming headers and body, readable only during this context's lifetime.
Response: HttpResponse
The outgoing response configuration. Initially status 200 with empty content.
Methods
11 items
Close() -> ()
Ends the exchange without implicitly sending a response. Safe to repeat.
Complete(cancellationToken?: CancellationToken) -> Task<Result<void, HttpError>>
Snapshots response headers and sends buffered bytes or a known-length stream, then closes the exchange. Reports validation/send errors or acknowledged cancellation; all end the exc…
Dispose() -> ()
Equivalent to Close; await Respond separately to observe send completion.
Implements Disposable.Dispose
Equals(other: object?) -> bool
Tests reference identity by default; an ordinary class may override equality.
Inherited from Object.Equals
GetHashCode() -> int
Returns a stable identity hash by default; an ordinary class may override it consistently with equality.
Inherited from Object.GetHashCode
GetType() -> TypeInfo
Returns metadata for the concrete runtime type of this instance.
Inherited from Object.GetType
Respond(statusCode: HttpStatusCode, content: HttpContent) -> ()
Forwards status and content configuration to Response without sending.
Respond(statusCode: HttpStatusCode) -> ()
Forwards status and empty-content configuration to Response without sending.
RespondText(statusCode: HttpStatusCode, text: string) -> ()
Configures a status and UTF-8 text/plain content; call Complete to send it.
RespondText(text: string) -> ()
Configures status 200 and UTF-8 text/plain content; does not send it.
ToString() -> string
Returns the concrete runtime type name for supported references, or display text from a class or boxed-struct override.
Inherited from Object.ToString