• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSURLConnection connectionDidFailWithError: hides server response
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSURLConnection connectionDidFailWithError: hides server response
      • From: John Fox <email@hidden>
References: 
 >NSURLConnection connectionDidFailWithError: hides server response (From: John Fox <email@hidden>)

  • Prev by Date: Custom View for "Accessories"
  • Next by Date: Re: Optimizing PDFKit
  • Previous by thread: NSURLConnection connectionDidFailWithError: hides server response
  • Next by thread: Re: NSURLConnection connectionDidFailWithError: hides server response
  • Index(es):
    • Date
    • Thread