I am novice to HTTP related matters. My question is in iOS development, I would like to send a string using HTTP Header, so I'm using:
[httpRequest setValue:@"nonEnglishString" forHTTPHeaderField:@"customHeader"];
The receiving server is Python(Google App Engine), saving the string value in the db model as StringProperty using:
dataEntityInstance.nonEnglishString = unicode(self.request.headers.get('customHeader')
However, the problem is when I try to send non-English string like Korean, it's saved in HTTP header like this:
Customheader = "\Uc8fc\Uba39\Uc774 \Uc6b4\Ub2e4";
and when it's received by Google App Engine and saved in DataStore, it's changed to be like:
??? ??
as if it can't find the proper characters for the unicode value.
Is it not POSSIBLE or ALLOWED to send non-English string using HTTP Header?
If my iOS uses just setHTTPBody, it can transfer non-English strings and save to App Engine's DataStore properly.
[httpRequest setHTTPBody:[httpBody dataUsingEncoding:NSUTF8StringEncoding]];
But I just can't find the right way to achieve same goal using HTTP Headers, like what many APIs like Foursquare's do and saving the strings in the proper forms in Python based Google App Engine's DataStore