Tags:
foundation
networking
Description:
Mattt Thompson described NSURLProtocol as "an Apple-sanctioned man-in-the-middle attack." Buried deep in Foundation's URL Loading System, NSURLProtocol allows us to intercept requests for URLs from the API libraries we are more familiar with, e.g. AFNetworking, NSURLConnection, UIWebView, NSURLDownload.