Back to Alamofire

URLRequestConvertible

docs/docsets/Alamofire.docset/Contents/Resources/Documents/Protocols/URLRequestConvertible.html

5.12.0706 B
Original Source

URLRequestConvertible

public protocol URLRequestConvertible : Sendable

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

`

                asURLRequest()
                `

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 }