This works fine, but blocks my for 1 sec on a good day - who know how long if 
the net is slow:

url = something/which/might/exist/or/not.gif
data = [ NSData dataWithContentsOfURL: url options: mask error: &outError ];

So I am trying to use NSURLConnection instead. Also works fine.

Only: if my url does not exist, then the old method returned data = nil. Very 
good.

Using  NSURLConnection I always get some answer - either image data or a 
lengthy string like:

HTML 4.0 Transitional//EN">
<html>
        <head>
                <title>Error 404 - Page not found</title>
        </head>
        <body bgcolor="#000000">
[...]


Is there a way to get just the status (in this case 404) without parsing the 
data?
I looked at the NSURLConnection delegate methods, but did not find anything 
which looked appropriate.

Gerriet.

_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to