Structure
PlaintextEncoder
Encodes data as plaintext, utf8.
struct PlaintextEncoder
Topics
Initializers
init(HTTPMediaType)Creates a newPlaintextEncoder.
Instance Methods
func encode<E>(E, to: inout ByteBuffer, headers: inout HTTPHeaders) throwsContentEncoderconformance.func encode<E>(E, to: inout ByteBuffer, headers: inout HTTPHeaders, userInfo: [CodingUserInfoKey : any Sendable]) throws“Encode object” method. The provided encodable object’s contents must be stored in the providedNIOCore/ByteBuffer, and any appropriate headers for the type of the content may be stored in the providedHTTPHeadersobjects. The provideduserInfodictionary must be forwarded to the underlyingSwift/Encoderused to perform the encoding operation.
Relationships
Conforms To
ContentEncoderSwift.SendableSwift.SendableMetatype