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
session
The 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
request
The request to be send.
completion
The completion which will be called when the request was sent.
Return Value
The request to be able to cancel it if necessary.