BasicRequestContext
Implementation of a basic request context that supports everything the Hummingbird library needs
struct BasicRequestContext
Implementation of a basic request context that supports everything the Hummingbird library needs
struct BasicRequestContext
import Hummingbird
protocol InitializableFromSource<Source> : Sendable
A type that can be initialized from another type
protocol RequestContext : InitializableFromSource, RequestContextSource where Self.Source : RequestContextSource
Protocol 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 RequestContextSource
Protocol for source of request contexts
protocol Sendable
A 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: CoreRequestContextStorage
core 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 }