Vapor Documentation Beta

Protocol Content​Decoder

public protocol ContentDecoder
%3 ContentDecoder ContentDecoder URLEncodedFormDecoder URLEncodedFormDecoder URLEncodedFormDecoder->ContentDecoder FormDataDecoder FormDataDecoder FormDataDecoder->ContentDecoder

Types Conforming to Content​Decoder

FormDataDecoder

Decodes Decodable types from multipart/form-data encoded Data.

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