I'm attempting to post parameters to a Java servlet on Google App Engine via POST from an iPhone app. When the server is running locally, this works fine, but when it is deployed to App Engine, the parameters are always null. Why?
App Engine code:
String facebookFriendTokens = (String) req.getParameter("facebookFriendTokens"); //running on localhost, facebookFriendTokens works fine, deployed to GAE it's always null log.warning("Facebook friends = " + facebookFriendTokens);
iPhone code:
NSString *urlString = [NSString stringWithFormat:@"%@/new_huddle?access_token=%@", SERVER_URL, [defaults objectForKey:@"FBAccessTokenKey"]]; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:urlString]]; [request setHTTPMethod:@"POST"]; NSString *postString = [NSString stringWithFormat:@"facebookFriendTokens=%@&eventDate=%@&placesTokens=%@&name=%@", encodedFriendTokens, encodedDateString, placesQueryStringParm, encodedNameString]; [encodedNameString release]; [encodedDateString release]; [encodedFriendTokens release]; [request setHTTPBody:[postString dataUsingEncoding:NSUTF8StringEncoding]]; NSOperationQueue *queue = [[NSOperationQueue alloc] init]; [NSURLConnection sendAsynchronousRequest:request queue: ...
edgar vs henderson berkshire hathaway ufc 144 james jones james jones aladdin black forest
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.