Skip to content

Instantly share code, notes, and snippets.

@haruiz
Created March 27, 2017 08:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save haruiz/e4dc974f3287383b93751cfda19ff586 to your computer and use it in GitHub Desktop.
Save haruiz/e4dc974f3287383b93751cfda19ff586 to your computer and use it in GitHub Desktop.
const axios = require("axios");
module.exports = {
getToken : async(apikey)=>{
var config = {
headers: {'Ocp-Apim-Subscription-Key': apikey}
};
return axios.post("https://api.cognitive.microsoft.com/sts/v1.0/issueToken",{}, config);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment