Protocol
ContentEncoder
Conform a type to this protocol to make it usable for encoding data via Vapor’s
ContentConfiguration system.protocol ContentEncoder : Sendable
Topics
Instance Methods
func encode(some Encodable, to: inout Data, headers: inout HTTPFields, userInfo: [CodingUserInfoKey : any Sendable]) throws“Encode object” method. The provided encodable object’s contents must be stored in the providedFoundation/Data, and any appropriate headers for the type of the content may be stored in the providedHTTPFieldsobjects. The provideduserInfodictionary must be forwarded to the underlyingSwift/Encoderused to perform the encoding operation.
Relationships
Inherits From
Swift.SendableSwift.SendableMetatype