Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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] Thu, 11 January 2018 04:58
Umar Farooq is currently offline Umar FarooqFriend
Messages: 11
Registered: October 2017
Junior Member
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: Thu Nov 15 23:50:18 GMT 2018

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

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

Back to the top