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 -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -