0

I am getting error: http header 'www-authenticate' used for proxy authentication not found, while running .js script. I have tried many ways to set proxy authentication but it's giving syntax error everytime. Following is my code and commented lines are the ones that I have tried (but not working):

var url = someURL; var result;

var request = new HttpClientRequest(url);
//request.header("Authorization", "Bearer token")
//WWW-Authenticate: Bearer token
request.method="GET";
//request.header('WWW-Authenticate: Bearer token realm="My Realm"');
request.header["Content-Type"] = "text/xml; charset=utf-8";
//request.header["WWW-Authenticate"] = "Bearer token";
Barkha
  • 13
  • 5

1 Answers1

0

I figured out the answer. Authentication header can be set as follows: request.header["Authorization"] = "Bearer token";

Barkha
  • 13
  • 5