Expand description
HTTP abstraction traits: IHttpContext, IHttpRequest, IHttpResponse.
This module defines the core interfaces for HTTP request/response handling in the LRWF framework. All types are defined as traits to enable testability and middleware composition.
§Traits
IHttpContext— The central context for a single HTTP request, providing access to request, response, and authentication claims.IHttpRequest— Read-only access to the incoming HTTP request.IHttpResponse— Mutable access to the outgoing HTTP response.IClaimsExt— Extension for storing/retrieving authentication claims.FromHttpContext— Build a request struct from HTTP request data.
§Helpers
read_json_body— Deserialize JSON from the request body.write_json_response— Serialize a value as JSON into the response.
Structs§
- Http
Status - Common HTTP status codes.
Traits§
- From
Http Context - Trait for constructing a request struct from the HTTP context.
- IClaims
Ext - Extension trait that adds claims storage to an
IHttpContext. - IHttp
Context - HTTP context encapsulating the request, response, and service provider for the duration of a single HTTP request.
- IHttp
Request - HTTP request abstraction.
- IHttp
Response - HTTP response abstraction.
Functions§
- read_
json_ body - Helper: read JSON from the request body.
- write_
json_ response - Helper: build a JSON response by serializing a value and writing it.
Type Aliases§
- Json
- Type alias for JSON responses in controller methods.