RequestExecuter
public protocol RequestExecuter
The protocol request executers need to conform to to be able to be used to send requests.
-
The session the request will be send on
Declaration
Swift
var session: URLSession { get } -
# Summary The initialiser of the
RequestExecuter.Declaration
Swift
init(session: URLSession)Parameters
sessionThe session the request will be send on.
-
# Summary Sending the given request
Declaration
Swift
func send(request: URLRequest, _ completion: @escaping ((Data?, URLResponse?, Error?) -> Void)) -> CancellableRequest?Parameters
requestThe request to be send.
completionThe completion which will be called when the request was sent.
Return Value
The request to be able to cancel it if necessary.
View on GitHub
Install in Dash
RequestExecuter Protocol Reference