Vapor Documentation

Protocol Content​Encoder

public protocol ContentEncoder  
%389 ContentEncoder ContentEncoder URLEncodedFormEncoder URLEncodedFormEncoder URLEncodedFormEncoder->ContentEncoder PlaintextEncoder PlaintextEncoder PlaintextEncoder->ContentEncoder

Types Conforming to Content​Encoder

PlaintextEncoder

Encodes data as plaintext, utf8.

URLEncodedFormEncoder

Encodes Encodable instances to application/x-www-form-urlencoded data.

Requirements

encode(_:​to:​headers:​)

func encode<E>(_ encodable: E, to body: inout ByteBuffer, headers: inout HTTPHeaders) throws
        where E: Encodable