Structurehummingbird 2.1.0HummingbirdCore
Request
Holds all the values required to process a request
Request.swift:19struct Request
Citizens in HummingbirdCore
Conformances
protocol Copyable
A type whose values can be implicitly or explicitly copied.
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Escapable
protocol Sendable
Type members
init(head: HTTPRequest, body: RequestBody
) Create new Request
Instance members
var body: RequestBody
Body of HTTP request
var description: String
let head: HTTPRequest
HTTP head
var headers: HTTPFields
Request HTTP headers
var method: HTTPRequest.Method
Request HTTP method
let uri: URI
URI path
func collectBody(upTo: Int
) async throws -> ByteBuffer Collapse body into one ByteBuffer.
Available in Hummingbird
Instance members
func decode<Type>(as: Type.Type, context: some RequestContext
) async throws -> Type Decode request using decoder stored at
Application.decoder
.