Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can NSURLConnection use Proxy Server?




On Oct 31, 2008, at 8:42 PM, Nick Zitzmann <email@hidden> wrote:

On Oct 31, 2008, at 10:05 AM, malcom wrote:

I'm using NSURLConnection and NSURLRequest to make connection to a
server. Now I would to implement Proxy server connection but I
cannot find something about it inside the docs. Anyone can point to
me to the right way?


NSURLConnection does this automatically if you have a proxy server set up in your network preferences.


While this is correct that the NSURLConnection will handle proxy settings set for the system as a whole, I do not believe that this was the question malcom was asking.


If you have one type of connection you need to make through an HTTP proxy, the default NSURLConnection does not provide an interface to do this. Underneath its using the lower level C-based CFURLConnection classes, and if you can parse through the API's enough you'll see that you can get the data blob BEFORE it's actually sent out the wire, and modify it into an HTTP Proxy request. (Please see the RFC on how to make an HTTP Proxy request if you don't know.)

But it's not a trivial task, but you can do it.

Scott
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.