4

I want to use the proxy server as below to send a request.But I don't know the way to use a proxy server in objective-c? proxy server:

72.64.146.136: 3128

Can anyone tell me?Thank you sincerely!

iPatel
  • 46,010
  • 16
  • 115
  • 137
stream
  • 369
  • 1
  • 7
  • 18
  • You can check this other question for an example of how to do it: [Handling redirects with custom NSURLProtocol and HTTP proxy](https://stackoverflow.com/questions/28361357/handling-redirects-with-custom-nsurlprotocol-and-http-proxy). – heitortsergent Oct 21 '16 at 21:26

1 Answers1

0

You could use a proxy by using CFURL but a much nicer option is to use a networking library such as AFNetworking which has proxy support in its API.

https://github.com/AFNetworking/AFNetworking

For more on the CFURL approach, see Using a proxy for NSURLConnection

Community
  • 1
  • 1
occulus
  • 16,959
  • 6
  • 53
  • 76