I want to use a proxy server when opening a url connection with objective-c.But I don't want to use any frameworks other than MKNetworkKit(a third party framework) in my project.Can anyone tell me how to accomplish this?
MKNetworkKit has no special support for HTTP proxies, but, because it uses NSURLConnection
and NSURLRequest
, you can add proxy support as described in this answer: How to add a proxy to NSURLRequest
.
In short:
NSURLProtocol
that adds your proxy information to the request+[NSURLProtocol registerClass:]
)Of course, it might be simpler just to use CFNetwork directly.