Created
April 9, 2021 13:04
-
-
Save ragog/19e6e9eb9cd3b4ca0caba4891226d945 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 { default: axios } = require("axios"); | |
const AUTH_TOKEN = Buffer.from(process.env.API_KEY).toString('base64') | |
axios({ | |
method: 'get', | |
url: 'https://api.stripe.com/v1/customers', | |
headers: { | |
'Authorization': `Basic ${AUTH_TOKEN}`, | |
'content-type': 'application/x-www-form-urlencoded' | |
}, | |
data: 'limit=3' | |
}).then((response)=> { | |
console.log(response.data) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment