Error when sending content in http from arduino sensor node [message #1779674] |
Wed, 10 January 2018 23:58 |
Eclipse User |
|
|
|
Hi,
In the following link: https://wiki.eclipse.org/OM2M/one/App#oneM2M_Arduino_application
the Arduino application, we can post using the following string:
// prepare the HTTP request
String req = String()+"POST " + url + " HTTP/1.1\r\n" +
"Host: " + host + "\r\n" +
"X-M2M-Origin: " + origin + "\r\n" +
"Content-Type: application/json;ty="+ty+"\r\n" +
"Content-Length: "+ rep.length()+"\r\n"
"Connection: close\r\n\n" +
rep;
The content is "rep" I assume?
At the moment I am getting an error saying "error in provided content" (attached screenshot).
The question is how is rep formatted so we don't get any content errors when posting?
Best Regards,
Umar Farooq
|
|
|
Powered by
FUDForum. Page generated in 0.02555 seconds