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
Post a Comment