Required Associated Typehummingbird 2.15.0Hummingbird
Source
RequestContext.swift:76associatedtype Source = ApplicationRequestContextSource
associatedtype Source = ApplicationRequestContextSource
import Hummingbird
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.
struct ApplicationRequestContextSource
RequestContext source for contexts created by Application
.
associatedtype Source
associatedtype Decoder : RequestDecoder = JSONDecoder
associatedtype Encoder : ResponseEncoder = JSONEncoder
var coreContext: CoreRequestContextStorage { get set }
Core context
var maxUploadSize: Int { get }
Maximum size of request body allowed when decoding requests. If a request body that needs decoding is greater than this size then a Content Too Large (413) response is returned. This only applies to decoding requests.
var requestDecoder: Self.Decoder { get }
Request decoder
var responseEncoder: Self.Encoder { get }
Response encoder