URLRequestConvertible

public protocol URLRequestConvertible : Sendable

Types adopting the URLRequestConvertible protocol can be used to safely construct URLRequests.

  • Returns a URLRequest or throws if an Error was encountered.

    Throws

    Any error thrown while constructing the URLRequest.

    Declaration

    Swift

    func asURLRequest() throws -> URLRequest

    Return Value

    A URLRequest.

  • urlRequest Extension method

    The URLRequest returned by discarding any Error encountered.

    Declaration

    Swift

    public var urlRequest: URLRequest? { get }