NetworkRequest
public protocol NetworkRequest
The network request is a protocol that serves as a base protocol for requests on remote servers.
The protocol is mainly used as a common base for Request
and StreamRequest
. You should
never directly use this protocol as it hardly provides any functionality.
-
usesSecureProtocol
Default implementationWhether the request makes use of the secure counterpart of the protocol (e.g.
https
for HTTP requests,wss
for WebSockets). By default, this is set totrue
. Think twice before setting this tofalse
and allowing insecure network requests.Default Implementation
Declaration
Swift
var usesSecureProtocol: Bool { get }
-
routes
Default implementationThe routing paths of the request. By default, no routing paths are used.
Default Implementation
Declaration
Swift
var routes: HttpRoute { get }
-
query
Default implementationThe query parameters to be used in the request. Defaults to no parameters.
Default Implementation
Declaration
Swift
var query: HttpQuery { get }
-
header
Default implementationThe header fields set when scheduling the request. These fields overwrite potential header fields defined by the HTTP service that the request is issued against. Defaults to no headers.
Default Implementation
Declaration
Swift
var header: HttpHeader { get }
-
priority
Default implementationThe priority of the request. Defaults to
.userInitiated
.Default Implementation
Declaration
Swift
var priority: RequestPriority { get }