Skip to content

Instantly share code, notes, and snippets.

@barisuyar
Created September 7, 2022 13:31
Show Gist options
  • Save barisuyar/0e144340b41c595c29e9cc2cb47af68f to your computer and use it in GitHub Desktop.
Save barisuyar/0e144340b41c595c29e9cc2cb47af68f to your computer and use it in GitHub Desktop.
canonicalRequest and stopLoading
final class MockURLProtocol: URLProtocol {
override class func canInit(with request: URLRequest) -> Bool { true }
override class func canonicalRequest(for request: URLRequest) -> URLRequest { request }
override func stopLoading() { }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment