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";
4

1 回答 1

0

我想出了答案。认证头可以设置如下:request.header["Authorization"] = "Bearer token";

于 2020-05-14T12:53:00.713 回答