ResponseHeaderDecodingStrategy

public protocol ResponseHeaderDecodingStrategy

A protocol for defining strategies for decoding response headers.

Implement this protocol to create custom strategies for decoding response headers.

Example usage:

public class SpecificHeaderDecodingStrategy: ResponseHeaderDecodingStrategy {
    // Implement the required methods and properties here
}
  • The type of the raw value that will be decoded from the response header.

    This associated type represents the type of the raw value that will be decoded from the response header. It must conform to the Codable protocol.

    Declaration

    Swift

    associatedtype RawValue : Decodable, Encodable
  • Decodes the raw value from the given decoder.

    This method is responsible for decoding the raw value from the given decoder.

    Throws

    An error if the decoding process fails.

    Declaration

    Swift

    static func decode(decoder: Decoder) throws -> RawValue

    Parameters

    decoder

    The decoder to read data from.

    Return Value

    The decoded raw value.