URLConvertible

public protocol URLConvertible : Sendable

Types adopting the URLConvertible protocol can be used to construct URLs, which can then be used to construct URLRequests.

  • Returns a URL from the conforming instance or throws.

    Throws

    Any error thrown while creating the URL.

    Declaration

    Swift

    func asURL() throws -> URL

    Return Value

    The URL created from the instance.