Vote count:
0
I'm building a simple node.js app that is going to make requests to a JIRA , and for that I need to be authenticated. For now, I'm running the JIRA server on my local machine.
I'm using the request module to make my requests. Here's an example of a simple request that I'm trying to do:
function callback(error, response, body) {
if (!error && response.statusCode == 200) {
var json = JSON.parse(body);
return json;
}
}
request.get('http://localhost:8080/an_issue_path', callback).auth(username, password, false);
The problem is that I'm just receiving a 401
, with the error message:
{"errorMessages":["You do not have the permission to see the specified issue.","Login Required"],"errors":{}}
.
But, what I don't understand is that when I do a curl
request, like this:
curl -u username:password http://localhost:8080/an_issue_path
, I get a 200
with the correct json.
What am I doing wrong?
asked 41 secs ago
Did you ever figure it out? Having the exact same issue now
RépondreSupprimerDid you ever figure it out? Having the exact same issue now
RépondreSupprimer