We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 54bd14d commit ee3cc1fCopy full SHA for ee3cc1f
src/indexingapi.js
@@ -2,13 +2,13 @@
2
3
require('isomorphic-fetch');
4
const Promise = require('es6-promise').Promise;
5
-
+const { Base64 } = require('js-base64');
6
7
const BASE_URL = 'https://api.addsearch.com/v2/indices/';
8
9
const getHeaders = function(sitekey, privatekey) {
10
return {
11
- 'Authorization': 'Basic ' + Buffer.from(sitekey + ':' + privatekey).toString('base64'),
+ 'Authorization': 'Basic ' + Base64.encode(sitekey + ':' + privatekey),
12
'Content-Type': 'application/json'
13
};
14
}
0 commit comments