URLRequest
extension URLRequest: URLRequestConvertible
-
Returns a URL request or throws if an
Errorwas encountered.Declaration
Swift
public func asURLRequest() throws -> URLRequest -
Creates an instance with the specified
method,urlStringandheaders.Declaration
Swift
public init(url: URLConvertible, method: HTTPMethod, headers: HTTPHeaders? = nil) throwsParameters
urlThe URL.
methodThe HTTP method.
headersThe HTTP headers.
nilby default.Return Value
The new
URLRequestinstance.
URLRequest Extension Reference