• 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: NSMutableURLRequest google my maps help
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSMutableURLRequest google my maps help


  • Subject: Re: NSMutableURLRequest google my maps help
  • From: Jerry Krinock <email@hidden>
  • Date: Sun, 24 Oct 2010 17:13:26 -0700

On 2010 Oct 24, at 13:26, Philip Vallone wrote:

> I am not getting a response back, which indicates my post method is wrong.

I disagree.  You probably are getting a response, but you're allowing it to fall into the bit bucket on the floor.

What are logging there, although you have labelled it "Response:", is actually your received *data*.  Try this instead:

NSURLResponse* response = nil ;
NSError* error = nil ;
NSData *rxData = [NSURLConnection sendSynchronousRequest:uploadRequest
                                       returningResponse:&response
                                                   error:&data] ;
NSString *rxString = [[NSString alloc] initWithData:returnData
                                           encoding:NSUTF8StringEncoding] ;
NSLog(@"Rx Response: %@ ", response) ;
NSLog(@"Rx Data: %@ ", rxString) ;
NSLog(@"Rx Error: %@ ", error) ;

Only programmers who are way smarter than me can afford to throw away the response and error when they're hitting a third-party server for the first time  :)

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSMutableURLRequest google my maps help
      • From: Philip Vallone <email@hidden>
References: 
 >NSMutableURLRequest google my maps help (From: Philip Vallone <email@hidden>)

  • Prev by Date: Re: NSError help
  • Next by Date: Re: NSMutableURLRequest google my maps help
  • Previous by thread: NSMutableURLRequest google my maps help
  • Next by thread: Re: NSMutableURLRequest google my maps help
  • Index(es):
    • Date
    • Thread