AnsweredAssumed Answered

SPWF01SA custom HTTP POST request Problem!

Question asked by Archit Saraf on Mar 15, 2018
Latest reply on Apr 1, 2018 by Bernardo Almeida

Hello and good day!


I'm attempting to use the SPWF01SA module with an STM32F0 microcontroller to post some data onto a remote web server. 


I have come to understand that the  AT+S.HTTPPOST command can only post form data. However, my requirement is to post a JSON packet instead of form data. So, I'm using the  AT+S.HTTPREQ command to send a custom POST request. However, the problem I'm facing is that I'm receiving only "\r" as response from the SPWF01SA module, on executing the AT+S.HTTPREQ command.


To walk through my steps, I'm first connecting to a WiFi network using all relevant commands, and am able to successfully receive the "WIND:24" message from the module. After this, I'm sending the AT+S.HTTPREQ command to the module in the following format:



POST /gaiahardsurveytest/v2/getHardSurveyData HTTPS/1.1\r\n

Host: SPWF01SA\r\n

Content-Type: application/json\r\n

Content-Length: 700\r\n




I would like to make a special mention that I need to POST data to an HTTPS server, however, I've tried posting over HTTP as well, and have faced the same issue of not getting any reply from the SPWF01SA module beyond a "\r" which the module sends back instantly.


Please guide me, and tell me if I'm missing any steps or making any errors.


Thank you,