AnsweredAssumed Answered

Getting HTTP POST to work on SPWF04S

Question asked by Arta Riazrafat on Jul 12, 2018
Latest reply on Jul 13, 2018 by Arta Riazrafat

Hello, I am trying to get a simple HTTP POST command to work. 

 

I am using http://ptsv2.com 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 failed

 

I 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.

Outcomes