Open indolering opened 9 years ago
No it is not supported. However you might be able to use basic auth using global options https://github.com/request/request#requestdefaultsoptions of the request module?
True, although I would prefer to use Popsicle since I am deploying to the browser.
if (this.token.isQuery) {
queryParameters[this.token.headerOrQueryName] = this.token.value;
} else if (this.token.headerOrQueryName) {
headers[this.token.headerOrQueryName] = this.token.value;
} else {
headers['Authorization'] = 'Bearer ' + this.token.value;
}
new YourClass({
token: {
value: 'Basic ' + encode(username + ':' + password),
headerOrQueryName: "Authorization"
}
});
Does the Node.js template support basic auth? It looks like it only accepts API tokens....