I am supposed to send information to server using curl but my embedded device doesn't support libcurl library yet. As I googled it out, it looks like I can use POST and get things done but am getting error 400 from server when I do the same. All I had to do with Curl was that to add HTTP header and then post data and it goes like
URL shared:
https://api.sampledomain.com/v1/action
Header:
Authorization: Bearer aabbccddee
Data:
{"action":"112233445566","device_id":"1234567890"}
Below is the POST command I compiled and the string goes like below.
POST /v1/action HTTP/1.1
Host: api.sampledomain.com
Authorization: Bearer aabbccddee
{"action":"112233445566","device_id":"1234567890"}
Response for the above POST command was: 400
Please help me out guys. Thanks.