URLRequest
struct URLRequest : ReferenceConvertible, Equatable, Hashable
-
Returns
allHTTPHeaderFields
asHTTPHeaders
.Declaration
Swift
public var httpHeaders: HTTPHeaders { get set }
-
Returns
self
.Declaration
Swift
public func asURLRequest() throws -> URLRequest
-
Creates an instance with the specified
url
,method
, andheaders
.Declaration
Swift
public init(url: URLConvertible, method: HTTPMethod, headers: HTTPHeaders? = nil) throws
Parameters
url
The
URLConvertible
value.method
The
HTTPMethod
.headers
The
HTTPHeaders
,nil
by default.
-
Returns the
httpMethod
as Alamofire’sHTTPMethod
type.Declaration
Swift
var method: HTTPMethod? { get set }