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 -

Qt QGraphicsScene is not accessable from QGraphicsView (on Qt 5.6.1) -

What is happening when Matlab is starting a "parallel pool"? -