Instance Method
decode(_:from:headers:userInfo:)
“Decode object” method. The provided
NIOCore/ByteBuffer should be decoded as a value of the given type, optionally guided by the provided HTTPHeaders. The provided userInfo dictionary must be forwarded to the underlying Swift/Decoder used to perform the decoding operation.func decode<D>(_: D.Type, from body: ByteBuffer, headers: HTTPHeaders, userInfo: [CodingUserInfoKey : any Sendable]) throws -> D where D : Decodable
Discussion
For legacy API compatibility reasons, the default protocol conformance for this method forwards it to the legacy decode method.