cancel
Showing results for 
Search instead for 
Did you mean: 

SPWF04 HTTP POST Problem

Dmytro Medvid
Associate II
Posted on January 09, 2018 at 14:30

Hello, everybody.

I want to use HTTP client mode. I should send the next message: 

api/Tokens?username=test&password=123456789&serialnumber=123456789

to the server:

https://messagebus.example.com

and get the response. 

I try to make next:

AT+S.HTTPPOST=messagebus.example.com,/api/Tokens,,,,,Get.txt,Send.txt

In send file i have 

username=

test

&password=

123456789

&serialnumber=

123456789

but, server give me Error 404 answer. I think, there is a problem in my AT+S.HTTPOST mesage.

4 REPLIES 4
Posted on January 09, 2018 at 16:48

Probably I'm using wrong URL...

I get 'DNS error' (502 Bad Gateway) with the browser, and 'Http Client Error:0' with the module. Is it correct 'messagebus.example.com'?

Posted on January 09, 2018 at 19:28

No, it is just for example.

Posted on January 10, 2018 at 11:28

Don't know how to help you...

Try to bypass the send.txt file, and directly put form content into <path&query> parameter. Same result?

AT+S.HTTPPOST=messagebus.example.com,/api/Tokens?

username=test&password=123456789&serialnumber=123456789

,,,,,,
Posted on January 11, 2018 at 17:51

YES, it works!!

Thanks))