You are reading a single comment by @Geza and its replies. Click here to read the full conversation.
  • My REST API example:

    var options = {
      protocol: "http:",
      method: 'POST',
      host: 'XXXX.XXXX.XXXX.XXXX',  // Proxy IP
      path: 'https://endpoint.com/', // Landing URL
      port: 8888,
      pathname: "restpath",
      search: null,
      query: null,
      headers: { "Content-Type": "application/json", "Content-Length": content.length }
    };
    
    var req = require("http").request(options, function (res) {
      var d = "";
      res.on('data', function (data) { if (d.length < 8) d += data; });
      res.on('close', function (data) { callback(); });
    });
    req.on('error', function (e) {
      callback();
    });
    req.end(content);
      } catch (f) {
    }
    
About

Avatar for Geza @Geza started