but HTTPSND command sends only one extra header fileds and the rest are sent as simple data.
Any help would be appreciated.
Regards,
Fahmi
Please write the exact HTTPSND command you are using.
I’m sorry, I wrote my post a while after switching to another task so it wasn’t precise.
The problem is: the server expects each header’s parameter in a new line, but the HTTPSND command consider all passed parameters in the <extra_header_line> field as a unique parameter.
You can use a combination of two “greater than” (>>) characters to separate multiple headers inside the extra_header_lines. The module will replace “>>” with a CR-LF combination and it should be received correctly by the server.
POST /webserver HTTP/1.1 Connection: close Host: server.com:80 Authorization: Basic Og== Content-Type: text/plain; 1 X-DeviceId:66666666>>X-DeviceType:tesal Content-Length: 90
HTTP/1.1 400 Bad Request Content-Length: 26 Server: Microsoft-HTTPAPI/2.0 Date: Fri, 18 Sep 2015 12:42:24 GMT Connection: close
the device type is missingvers=1
data=AAAAAAAA
Can you specify the SW version on this module? The command is AT+CGMR
12.00.004
12.00.004
The support for multiple header lines should have been added with SW version 12.00.xx5. I suggest you to upgrade the module to the latest SW version (12.00.006) and your issue should be solve.
We use cookies to enhance your browsing experience and help us improve our websites. To improve our website, we carefully select third parties that use cookies to allow us to serve specific content and achieve the purposes set out in our cookie policy. For more information on how to make adjustments through your browser to the cookies being used on your device, please click Find Out More link. By closing this banner or continuing to browse our website, you agree to our use of such cookies. FIND OUT MORE
Hi,
I’m trying to send a POST with multiple extra header fields like the following:
but HTTPSND command sends only one extra header fileds and the rest are sent as simple data.
Any help would be appreciated.
Regards,
Fahmi
Please write the exact HTTPSND command you are using.
I’m sorry, I wrote my post a while after switching to another task so it wasn’t precise.
The problem is: the server expects each header’s parameter in a new line, but the HTTPSND command consider all passed parameters in the <extra_header_line> field as a unique parameter.
If I use the following command:
then the server will answer:
If I add the device ID like this:
I can see in Wireshark the following TCP stream
You can see above that two POST parameters were presented at the same line (DeviceId:66666666, DeviceType:tesal).
So I need a way to make each parameter in the POST be presented in a new line like the following:
You can use a combination of two “greater than” (>>) characters to separate multiple headers inside the extra_header_lines.
The module will replace “>>” with a CR-LF combination and it should be received correctly by the server.
This command should work:
AT#HTTPSND=0,0,”/webserver”,90,1,”DeviceId:66666666>>DeviceType:tesal”
It didn’t make it.
The server received however:
Can you specify the SW version on this module?
The command is AT+CGMR
12.00.004
The support for multiple header lines should have been added with SW version 12.00.xx5.
I suggest you to upgrade the module to the latest SW version (12.00.006) and your issue should be solve.