node.js - request REST API node js -


i'm using request-promise call api, i'm getting error:

requesterror: error: tunneling socket not established, cause=connect econnrefused 192.168.1.90:443

the code:

var rp = require('request-promise').defaults({ strictssl: false }); let options = {   method: 'post',   url: `https://${this.ip}:${this.port}/api/users/_login`,   headers:   {      accept: 'application/xml',     'content-type': 'application/xml',     'access-control-allow-origin':'*'   },   form: { username: this.username, password: this.password },   resolvewithfullresponse: true }; var self = this;   return rp(options).then(function (response) {     self.cookie = response.headers['set-cookie'][0];     }) }) 

anyone know issue can be?


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -