trying to fix authorization problems
This commit is contained in:
parent
a2f6358900
commit
d6b6b06a4b
1 changed files with 3 additions and 7 deletions
10
lib/bing.js
10
lib/bing.js
|
@ -21,7 +21,7 @@ var Bing = function (options) {
|
|||
var defaults = {
|
||||
|
||||
//Bing Search API URI
|
||||
rootUri: "https://api.datamarket.azure.com/Bing/Search/v1/",
|
||||
rootUri: "https://api.cognitive.microsoft.com/bing/v5.0/",
|
||||
|
||||
//Account Key
|
||||
accKey: null,
|
||||
|
@ -99,11 +99,8 @@ var Bing = function (options) {
|
|||
uri: reqUri,
|
||||
method: opts.method || "GET",
|
||||
headers: {
|
||||
"User-Agent": opts.userAgent
|
||||
},
|
||||
auth: {
|
||||
user: opts.accKey,
|
||||
pass: opts.accKey
|
||||
"User-Agent": opts.userAgent,
|
||||
"Ocp-Apim-Subscription-Key": opts.accKey
|
||||
},
|
||||
timeout: opts.reqTimeout
|
||||
|
||||
|
@ -311,4 +308,3 @@ function capitalise(s) {
|
|||
|
||||
|
||||
module.exports = Bing;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue