Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protocol URLSessionDataTaskProtocol {
- func resume()
- func cancel()
- }
- protocol URLSessionProtocol {
- func dataTask(
- with request: URLRequest,
- completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void
- ) -> URLSessionDataTask
- }
- extension URLSession : URLSessionProtocol{}
- extension URLSessionDataTask : URLSessionDataTaskProtocol{}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement