Vapor Documentation

Protocol Content​Decoder

public protocol ContentDecoder  
%83 ContentDecoder ContentDecoder URLEncodedFormDecoder URLEncodedFormDecoder URLEncodedFormDecoder->ContentDecoder PlaintextDecoder PlaintextDecoder PlaintextDecoder->ContentDecoder

Types Conforming to Content​Decoder

PlaintextDecoder

Decodes data as plaintext, utf8.

URLEncodedFormDecoder

Decodes instances of Decodable types from application/x-www-form-urlencoded Data.

Requirements

decode(_:​from:​headers:​)

func decode<D>(_ decodable: D.Type, from body: ByteBuffer, headers: HTTPHeaders) throws -> D
        where D: Decodable