BodyDecoder

public protocol BodyDecoder : AnyObject

A class that conforms to BodyDecoder must be able to decode from Data into a Codable type. This class can then be used to produce input objects for a Codable route.

  • Decode a Decodable type from a Data, using this BodyDecoder.

    Declaration

    Swift

    func decode<T>(_ type: T.Type, from data: Data) throws -> T where T : Decodable