getRequiredHeaderFieldAsURI(in:name:as:)

    Attempts to retrieve a required header field value and decodes it as a URI component, returning it as the specified type.

    Converter+Common.swift:157

    This declaration is gated by at least one @_spi attribute.

    func getRequiredHeaderFieldAsURI<T>(in headerFields: HTTPFields, name: String, as type: T.Type) throws -> T where T : Decodable

    Parameters

    headerFields

    The HTTP header fields dictionary where the field is expected.

    name

    The name of the header field to retrieve.

    type

    The expected type of the decoded value.

    Returns

    The decoded header field value as the specified type.

    Throws

    An error if the field is not present or if there’s an issue with decoding the URI component or if the field is present but cannot be decoded as the specified type.

    Other members in extension

    Type members

    Show system interfaces (1)

    Hide system interfaces

    Instance members

    Show system interfaces (44)

    Hide system interfaces