-
The method of the request.
Declaration
Swift
let method: Method
-
The requested URL.
Declaration
Swift
let url: URL
-
HTTP options.
Declaration
Swift
let options: String?
-
Initialize an HTTP request.
Declaration
Parameters
method
The request’s HTTP method.
url
The requested URL.
headers
Headers of the request.
body
An optional body of the request.
options
Optional HTTP options.
-
Construct a HTTP CONNECT request for establishing TCP tunnels through HTTP proxy server, which supports this.
Declaration
Parameters
target
The target of the request, i.e., the server to which the tunnel should be established.
proxy
The proxy server, through which the tunnel should be established.
headers
The headers of the request.
Return Value
The request,
nil
if arguments are invalid. -
Compose a request into date that can be sent to the HTTP server.
Declaration
Swift
var composed: Data { get }
Return Value
The composed request.