Copyright ©

Mongoose OS Forum


MJS callback error: [HTTP] is not defined

aravindmj97aravindmj97 INDIA
edited May 2018 in Mongoose OS

I'm trying to do a http cloud function call from my NodeMCU, but im getting the error as in the title MJS callback error: [HTTP] is not defined. I'm coding NodeMCU using JavaScript. Couldn't find a solution for this. Please provide me with a solution.
This is my code

    url: 'https://.....',
    headers: { 'X-Foo': 'bar' },     // Optional - headers
    data: {foo: 1, bar: 'baz'},      // Optional. If set, JSON-encoded and POST-ed
    success: function(body, full_http_msg) { print(body); },
    error: function(err) { print(err); },  // Optional


Sign In or Register to comment.