Structurevapor 4.114.1Vapor
PlaintextEncoder
Encodes data as plaintext, utf8.
struct PlaintextEncoder
Encodes data as plaintext, utf8.
struct PlaintextEncoder
import Vapor
Vapor is a framework for building server applications, APIs and websites in Swift. It provides a safe, performant and scalable foundation for building large complex backends.
protocol ContentEncoder : Sendable
Conform a type to this protocol to make it usable for encoding data via Vapor’s ContentConfiguration
system.
protocol Sendable
init(_ contentType: HTTPMediaType = .plainText)
Creates a new PlaintextEncoder
.
func encode<E>(_ encodable: E, to body: inout ByteBuffer, headers: inout HTTPHeaders) throws where E : Encodable
ContentEncoder
conformance.
func encode<E>(_ encodable: E, to body: inout ByteBuffer, headers: inout HTTPHeaders, userInfo: [CodingUserInfoKey : Sendable]) throws where E : Encodable
func encode<E>(_ encodable: E, to body: inout ByteBuffer, headers: inout HTTPHeaders, userInfo: [CodingUserInfoKey : Sendable]) throws where E : Encodable