BGS5T character encoding and attaching data in HTTP POST | Telit Cinterion IoT Developer Community
November 27, 2014 - 11:09am, 8858 views
Hi,
I have a problem with HTTP request. When I use AT commands module encodes underscore ("_") as \u00a7. So may api key in header is changed and I can't make that POST request.
When I use Java and httpconnection my form is emptey but apikey is correctly encoded. In form data have to be shaped like .csv. Example:
test,1234
test2,1235
So do you have any advice how can I add data to the form, or change encoding with AT commands. When doing that I tryed with:
AT^SICS=0,alphabet,1
But without success.
Here is my Java code:
Hello Jure,
For the at commands encoding please see the AT+CSCS command. The default character set is GSM. Then the underscore "_" should be send as \11 There's also a separate chapter in the AT commands specification: 1.7 Supported character sets.
For Java I would try to add getResponseCode() first. I'd also recommend you to see the POST example in the HttpConnection API for the module.
Regards,
Bartłomiej
Hello Bartłomiej,
I have found the problem. I added ":" to header names, and it looks that BGS5 automaticly adds : to some headers. So when I removed ':' it was ok.
Thank you for your help
Regards
Jure
Now I can see that...
Great!
Regards,
Bartłomiej