URLConvertible

public protocol URLConvertible

Types adopting the URLConvertible protocol can be used to construct URLs, which are then used to construct URL requests.

  • Returns a URL that conforms to RFC 2396 or throws an Error.

    Throws

    An Error if the type cannot be converted to a URL.

    Declaration

    Swift

    func asURL() throws -> URL