BasicRequestContext
Implementation of a basic request context that supports everything the Hummingbird library needs
struct BasicRequestContextImplementation of a basic request context that supports everything the Hummingbird library needs
struct BasicRequestContextimport Hummingbirdprotocol InitializableFromSource<Source> : SendableA type that can be initialized from another type
protocol RequestContext : InitializableFromSource, RequestContextSource where Self.Source : RequestContextSourceProtocol that all request contexts should conform to. A RequestContext is a statically typed metadata container for information that is associated with a Request, and is therefore instantiated alongside the request.
protocol RequestContextSourceProtocol for source of request contexts
protocol SendableA thread-safe type whose values can be shared across arbitrary concurrent contexts without introducing a risk of data races. Values of the type may have no shared mutable state, or they may protect that state with a lock or by forcing it to only be accessed from a specific actor.
init(source: ApplicationRequestContextSource) Initialize an RequestContext
var coreContext: CoreRequestContextStoragecore context
var endpointPath: String? { get }Endpoint path
var id: String { get }Request ID, extracted from Logger
var logger: Logger { get set }Logger to use with Request
var maxUploadSize: Int { get }Maximum size of request body allowed when decoding requests.
var parameters: Parameters { get }Parameters extracted from URI
var requestDecoder: JSONDecoder { get }var responseEncoder: JSONEncoder { get }