mirror of
https://github.com/jambonz/jambonz-api-server.git
synced 2026-07-04 19:21:53 +00:00
ffda2398f4
* replace bent by native node fetch * wip * wip * wip
15 lines
340 B
JavaScript
15 lines
340 B
JavaScript
const test = async() => {
|
|
fetch('https://api.github.com/user', {
|
|
method: 'GET',
|
|
headers: {
|
|
Authorization: `Bearer ${process.env.GH_CODE}`,
|
|
Accept: 'application/json',
|
|
'User-Agent': 'jambonz.cloud'
|
|
}
|
|
}, (err, response, body) => {
|
|
if (err) console.log(error);
|
|
else console.log(body);
|
|
})
|
|
};
|
|
|
|
test(); |