NetworkMockerURLProtocol
open class NetworkMockerURLProtocol : URLProtocol
The protocol which can be used to send Mocked data back. Use the Mocker to register Mock data
See
Mocker-
Returns Mocked data based on the mocks register in the
Mocker. Will end up in an error when no Mock data is found for the request.Declaration
Swift
override public func startLoading() -
Implementation does nothing, but is needed for a valid inheritance of URLProtocol.
Declaration
Swift
override public func stopLoading() -
Simply sends back the passed request. Implementation is needed for a valid inheritance of URLProtocol.
Declaration
Swift
override public class func canonicalRequest(for request: URLRequest) -> URLRequest -
Overrides needed to define a valid inheritance of URLProtocol.
Declaration
Swift
override public class func canInit(with request: URLRequest) -> Bool
View on GitHub