Re: NSHTTPURLResponse
Re: NSHTTPURLResponse
- Subject: Re: NSHTTPURLResponse
- From: Scott Anguish <email@hidden>
- Date: Mon, 7 Jul 2003 14:16:04 -0400
it can only create a file on disk (that's the purpose of NSURLDownload,
to download it to disk)
If you're using NSURLConnection, just implement
-connection:willSendRequest:redirectResponse: and test the
NSURLResponse there.
On Monday, July 7, 2003, at 6:45 AM, Koen van der Drift wrote:
On Sunday, July 6, 2003, at 04:04 PM, Scott Anguish wrote:
NSURLDownload should return an error when it encounters anything
like a 404. NSURLConnection on the other hand does give you the
redirected content.
NSHTTPURLResponse will be the response from the server, without the
data.
if you implement -download:willSendRequest:redirectResponse: (there
is a known error in the doc narrative that refers to this as
responseRequest: BTW) then you can get the returned NSURLResponse for
the request, and check the type of the object, and if it is a
NSHTTPURLResponse, then check the status values...
My mistake, I *am* using NSConnection, because it creates an NSData
object, not a file on disk. I use this NSData object to create a new
NSDocument. Is there a way to create an NSData object from
NSURLDownload, or can it only create a file on disk?
- Koen.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.