2018-07-12 10:49 AM
Hello, I am trying to get a simple HTTP POST command to work.
I am using
to host a server. I tested the server using curl command in ubuntu, so I know the issue is not there. What I am doing for HTTP POST:-> Create a file called 'helloworld.txt' with Hello World! written in it using the AT+S.FSC command (I get the AT-S.OK)
-> Connect to a WIFI network (I get the WIND:24 message)
-> Send the following command :
AT+S.HTTPPOST=ptsv2.com/t/testtesttest/post,/helloworld.txt,,,,,,
ptsv2.com/t/testtesttest/post being the hostname for the server and helloworld.txt is just a file in RAM.
I am getting:
AT-S.Http Client Error:0
AT-S.ERROR:111:Request failedI also tried sending config.fhtml instead of helloworld.txt which is a file in the flash, got the same error.
EDIT: AT-S.Http Client Error:0 is 'Error while resolving Hostname'. Not sure why the hostname is wrong, I am using the same hostname with linux curl.
Best Regards, Arta R.
#spwf04s2018-07-13 12:42 AM
Hello,
following is the correct command syntax (please also compare the
https://www.st.com/resource/en/user_manual/dm00329655.pdf
:(AT+S.HTTPPOST=ptsv2.com,/t/testtesttest/post,,,,,,helloworld.txt
You'll find my post in your toilet @2018-07-13 07:25:38 UTC.
Best Regards,
Elio
2018-07-13 09:35 AM
Thank you, it is working.