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 = {
|
var defaults = {
|
||||||
|
|
||||||
//Bing Search API URI
|
//Bing Search API URI
|
||||||
rootUri: "https://api.datamarket.azure.com/Bing/Search/v1/",
|
rootUri: "https://api.cognitive.microsoft.com/bing/v5.0/",
|
||||||
|
|
||||||
//Account Key
|
//Account Key
|
||||||
accKey: null,
|
accKey: null,
|
||||||
|
@ -99,11 +99,8 @@ var Bing = function (options) {
|
||||||
uri: reqUri,
|
uri: reqUri,
|
||||||
method: opts.method || "GET",
|
method: opts.method || "GET",
|
||||||
headers: {
|
headers: {
|
||||||
"User-Agent": opts.userAgent
|
"User-Agent": opts.userAgent,
|
||||||
},
|
"Ocp-Apim-Subscription-Key": opts.accKey
|
||||||
auth: {
|
|
||||||
user: opts.accKey,
|
|
||||||
pass: opts.accKey
|
|
||||||
},
|
},
|
||||||
timeout: opts.reqTimeout
|
timeout: opts.reqTimeout
|
||||||
|
|
||||||
|
@ -311,4 +308,3 @@ function capitalise(s) {
|
||||||
|
|
||||||
|
|
||||||
module.exports = Bing;
|
module.exports = Bing;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue