Files
jambonz-api-server/test/oauth/gh-get-user.js
T
Hoan Luu Huu ffda2398f4 replace bent by native node fetch (#401)
* replace bent by native node fetch

* wip

* wip

* wip
2025-04-24 06:50:15 -04:00

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();