Re: NSURLConnection connectionDidFailWithError: hides server response
Re: NSURLConnection connectionDidFailWithError: hides server response
- Subject: Re: NSURLConnection connectionDidFailWithError: hides server response
- From: Brian Bergstrand <email@hidden>
- Date: Wed, 5 Oct 2005 16:26:14 -0500
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
- - (void)download:(NSURLDownload *)download didReceiveResponse:
(NSURLResponse *)response
{
if ([response respondsToSelector:@selector(statusCode)] {
int status = [(NSHTTPURLResponse*)response statusCode]);
// ...
}
}
HTH.
On Oct 5, 2005, at 4:01 PM, John Fox wrote:
Hello:
I'm scratching my head a little bit here.
If I use NSURLConnection to POST data to a server, and there's a
server side error, and I implement the delegate method:
- (void)connection:(NSURLConnection *)connection didFailWithError:
(NSError *)error
How do I get the actual response from the server. Using a packet
sniffer, I can see that there's an actual response which is
informative, but nowhere in the error can I find the actual
server's response.
Can some kind soul help me, please?
Brian Bergstrand
<http://www.bergstrand.org/brian/> PGP Key ID: 0xB6C7B6A2
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)
iD8DBQFDREUAedHYW7bHtqIRArRzAKCuga98jIwxEj0P2DNCmbmFH68A2wCgzGb/
aRlhrP6HSJEvDje7eOfdfJI=
=/ql4
-----END PGP SIGNATURE-----
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden