Having a bit of a struggle with trying to do a JSON post on the HL7800
Maybe you have an example of AT+httpheader for a post of application/json type?
We are using the HL7800 module to get/send data to a web service with HTTP get/post
The HTTP Get part works fine but the problem is HTTP POST
What we do is:
- AT+KHTTPHEADER=1 After we send “Content-Type: application/json” + RETURN. “–EOF–Pattern–” We get OK from module.
- AT+KHTTPPOST=1,"/api/v1/hc" (we get CONNECT). After we send data.
It seems the server connection is working and the server gets some data, but something is wrong. We get “Bad Request” from the server and also server answer to us that “we are sending TEXT/PLAIN” data (you can see in the attached screenshot).
It seems that the command AT+KHTTPHEADER=1 is not working/is not accepted by the module.