URLRequestConvertible
public protocol URLRequestConvertible : Sendable
Types adopting the URLRequestConvertible
protocol can be used to safely construct URLRequest
s.
-
Returns a
URLRequest
or throws if anError
was encountered.Throws
Any error thrown while constructing theURLRequest
.Declaration
Swift
func asURLRequest() throws -> URLRequest
Return Value
A
URLRequest
. -
urlRequest
Extension methodThe
URLRequest
returned by discarding anyError
encountered.Declaration
Swift
public var urlRequest: URLRequest? { get }