-
-
Save BrychanOdlum/1d14e5601c73382c3c7fc644559f97f8 to your computer and use it in GitHub Desktop.
Genius example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const axios = require('axios'); | |
const fetchdata = async function(event, context) { | |
try { | |
const res = await axios({ | |
method: 'post', | |
url: `https://api.genius.com/search?q=test`, | |
headers: { | |
'Authorization': 'Bearer TOKEN' | |
}, | |
}); | |
console.log(res.response); | |
return res; | |
} catch (error) { | |
console.error(error); | |
} | |
return null; | |
}; | |
fetchdata(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment