mirror of
https://github.com/jambonz/jambonz-api-server.git
synced 2026-07-06 20:21:55 +00:00
18 lines
428 B
JavaScript
18 lines
428 B
JavaScript
const bent = require('bent');
|
|
const getJSON = bent('GET', 200);
|
|
const request = require('request');
|
|
|
|
const test = async() => {
|
|
request.get('https://api.github.com/user', {
|
|
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(); |