Skip to main content



      Home
Home » Eclipse Projects » OM2M » Error when sending content in http from arduino sensor node
Error when sending content in http from arduino sensor node [message #1779674] Wed, 10 January 2018 23:58
Eclipse UserFriend
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
Previous Topic:OM2M Compile Error
Next Topic:Achieving authentication on a public OM2M-IN
Goto Forum:
  


Current Time: Fri Apr 04 00:28:53 EDT 2025

Powered by FUDForum. Page generated in 0.02555 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top