0

I need to proxy all my app's http and https requests trought a proxy server.

I cannot just change the url because most of the requets are done via 3rd party libs.

I tried some code from: iOS any body knows how to add a proxy to NSURLRequest? but it seems to not work or is incomplete.

Can someone give me a good example?

Community
  • 1
  • 1
João Nunes
  • 3,751
  • 31
  • 32

1 Answers1

0

Ok so i ended up sorting this out with NSURLProtocol and ASIHTTPRequest.

I intercept in my NSURLProtocol class the request and send it to ASIHTTPRequest. Here i set up the proxy. Everything works fine!

João Nunes
  • 3,751
  • 31
  • 32