Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Mac > Mac Programmer Help > Re: (Obj-C) One...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 6 of 6 Topic 3733 of 3882
Post > Topic >>

Re: (Obj-C) One of these things is not like the other...

by David Phillip Oster <oster@[EMAIL PROTECTED] > May 6, 2008 at 11:38 PM

In article <oster-14136B.20333106052008@[EMAIL PROTECTED]
>,
 David Phillip Oster <oster@[EMAIL PROTECTED]
> wrote:

> In article <Ivmdnf5LbqkGkbzVnZ2dnUVZ_ournZ2d@[EMAIL PROTECTED]
>,
>  Don Bruder <dakidd@[EMAIL PROTECTED]
> wrote:
> > is there a simple, non-sync way of doing the deed? I envision a
fantasy  
> > to the tune of "Here's a URL and a callback. Holler via the callback 
> > when you've got the needed data so we can proceed"
> 
> /* AppDelegate.h - tested, works */
> 
> #im****t <Cocoa/Cocoa.h>
....
> 
> @[EMAIL PROTECTED]
 almost. The code I posted does work, for the case I tested.

There is one other NSURLConnection callback to handle,
that covers URLs that redirect.

There is additional complexity with NSURLCredentials, if you are trying
to access a password protected website, or the user is behind a
password-protected proxy.

There is additional complexity if you are doing HTTP PUTs or HTTP POSTs
to a URL that you haven't previously done an HTTP GET from, and that
URL redirects.

If you want to see code that handles all of these cases, take a look at
the GDataHTTPFetcher code in Greg Robbins' GData Objective C library.

http://code.google.com/p/gdata-objectivec-client/

http://code.google.com/p/gdata-objectivec-client/source/browse/trunk/Source/Networking/GDataHTTPFetcher.m

-- David Phillip Oster
 




 6 Posts in Topic:
(Obj-C) One of these things is not like the other...
Don Bruder <dakidd@[EM  2008-05-06 14:04:10 
Re: (Obj-C) One of these things is not like the other...
Gregory Weston <uce@[E  2008-05-06 18:52:29 
Re: (Obj-C) One of these things is not like the other...
Don Bruder <dakidd@[EM  2008-05-06 18:57:46 
Re: (Obj-C) One of these things is not like the other...
David Phillip Oster <o  2008-05-06 20:27:56 
Re: (Obj-C) One of these things is not like the other...
David Phillip Oster <o  2008-05-06 20:33:31 
Re: (Obj-C) One of these things is not like the other...
David Phillip Oster <o  2008-05-06 23:38:16 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Dec 5 9:52:27 CST 2008.