Answer the question
In order to leave comments, you need to log in
Why is the request not being authenticated?
Hello. I'm trying to make a request using the request module
request({
url: config.endpoint+'/name',
auth: {
username: 'Name',
password: 'Pass'
},
method: 'POST',
json: true,
strictSSL: false,
body: {json: 123}
}, async (e, resp, data) => {
});
curl -k -u Name:Pass -H 'Content-Type: application/json' -d '{"data":"123"}' https://url/name
Answer the question
In order to leave comments, you need to log in
UPD: I made a request to my server with curl and request, the Authorization header comes the same
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question