Re: NSMutableURLRequest google my maps help
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