Instance Methodhummingbird 2.3.0Hummingbird
decode(_:from:context:)
Extend URLEncodedFormDecoder to decode from Request
.
func decode<T>(_ type: T.Type, from request: Request, context: some RequestContext) async throws -> T where T : Decodable
Parameters
Other members in extension
Types
enum DateDecodingStrategy
The strategy to use for decoding
Date
values.
Type members
init(dateDecodingStrategy: URLEncodedFormDecoder.DateDecodingStrategy, userInfo: [CodingUserInfoKey : Sendable]
) Create URLEncodedFormDecoder
Instance members
var dateDecodingStrategy: DateDecodingStrategy
The strategy to use in Encoding dates. Defaults to
.deferredToDate
.var userInfo: [CodingUserInfoKey : Sendable]
Contextual user-provided information for use during encoding.
func decode<T>(T.Type, from: String
) throws -> T Decode from URL encoded form data to type