You are reading a single comment by @hansamann and its replies. Click here to read the full conversation.
  • This is strange, but using the "raw" request method it does work. I am posting this here so others can have an example of how to use the request method:

        var options = {
          host: 'hybrisiot.appspot.com', 
          port: '80',
          path:'/shelves/default/status/' + getButtonStatus(), 
          method:'post'
        };
    
        var req = require("http").request(options, function(res)
        {
    		res.on('data', function(data) {
              if (debug) {
    			console.log('> ' + data);
              }
            lights(data);
            setTimeout(postData, 5000); //repeat every 5 sec
    		digitalWrite(LED1,0);
          });
        });
        req.end();
    

    Unfortunately I have a new problem - will create a new thread for that.

About

Avatar for hansamann @hansamann started