goferito / node-bing-api

Node.js module for the Bing Search API (Cognitive Services)
MIT License
56 stars 28 forks source link

looking at the code #20

Closed the1mills closed 8 years ago

the1mills commented 8 years ago

Just out of curiosity

in lib/bing.js

there is

  auth: {
          user: opts.accKey,
          pass: opts.accKey
      },

why is that?

goferito commented 8 years ago

The bing API requires basic auth via url, where both user and password are the access key. That will compound the url https://access_key:access_key@bingserver.com/....