Copyright © https://mongoose-os.com

Mongoose OS Forum

frame

HTTPS.Query in Init.js don't work

chbchb Switzerland

I have this code in my Init.js for send the IP if the ESP32 module to my web service in NodeJS, but nothing is happening, I don't receive message in the web service, seems my code is correct .... Thanks for your help

RPC.call(RPC.LOCAL, 'Sys.GetInfo', null, function (resp, ud) {
    let ip = resp.wifi.sta_ip;
    let ipJSON = '{"ip":"'+ip+'"}';
    HTTP.query({
    url: 'https://mydomain.ch',
    headers: {'Content-Type': 'application/json'},
    data: ipJSON,
    success: function(body, full_http_msg) {print('Success');},
    error: function(err) {print(err);}
  });

Comments

Sign In or Register to comment.