1

I need to send GET request on https url with "Authorization" header. I try to do this using this code:

request.get({
  url: url,
  headers: {
    'Authorization': token,
    'abc': 'def'
  }
})

On server side I get "abc" header, but there is no Authorization header. Why does it happen?

Ildar
  • 3,808
  • 7
  • 45
  • 81

1 Answers1

0

Have you tried using auth key? See the details example in the project's readme request.get('http://some.server.com/', { 'auth': { 'user': 'username', 'pass': 'password', 'sendImmediately': false } });

chepukha
  • 2,371
  • 3
  • 28
  • 40