NetworkAccess
public protocol NetworkAccess
NetworkAccess
provides access to the network.
-
Fetches a request asynchrony from remote location.
Declaration
Swift
func load(request: URLRequest, callback: @escaping (Data?, HTTPURLResponse?, Error?) -> Void) -> NetworkTask
Parameters
request
The request one wants to fetch.
callback
Callback which gets called when the request finishes.
Return Value
the running network task