Skip to content

Instantly share code, notes, and snippets.

@rizky
Last active September 9, 2017 13:53
Show Gist options
  • Save rizky/2bc4011b44a295cb4d5675dde1f21609 to your computer and use it in GitHub Desktop.
Save rizky/2bc4011b44a295cb4d5675dde1f21609 to your computer and use it in GitHub Desktop.
search-sign
var request = require('request');
language = 'LSF'
search = 'right'
var options = {
url: `https://isara.search.windows.net/indexes/isara/docs?api-version=2015-02-28&searchMode=all&queryType=full&search=language:${language}%20AND%20speaker:${search}%20OR%20${search}*&api-key=F6621A479929D2E2B331E35CC3520462`,
headers: {
'Access-Token': 'request'
}
};
function callback(error, response, body) {
if (!error && response.statusCode == 200) {
var info = JSON.parse(body);
console.log(options.url);
console.log(info);
}
}
request(options, callback);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment