Advertisement
Guest User

Untitled

a guest
Jul 17th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. protocol URLSessionDataTaskProtocol {
  2. func resume()
  3. func cancel()
  4. }
  5.  
  6. protocol URLSessionProtocol {
  7. func dataTask(
  8. with request: URLRequest,
  9. completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void
  10. ) -> URLSessionDataTask
  11. }
  12.  
  13. extension URLSession : URLSessionProtocol{}
  14. extension URLSessionDataTask : URLSessionDataTaskProtocol{}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement