mirror of
https://github.com/jambonz/jambonz-api-server.git
synced 2025-12-19 05:47:46 +00:00
major merge of features from the hosted branch that was created temporarily during the initial launch of jambonz.org
19 lines
460 B
JavaScript
19 lines
460 B
JavaScript
const bent = require('bent');
|
|
const getJSON = bent('GET', 200);
|
|
const request = require('request');
|
|
require('request-debug')(request);
|
|
|
|
const test = async() => {
|
|
request.get('https://api.github.com/user', {
|
|
headers: {
|
|
Authorization: `Bearer ${process.env.GH_CODE}`,
|
|
Accept: 'application/json',
|
|
'User-Agent': 'jambonz.us'
|
|
}
|
|
}, (err, response, body) => {
|
|
if (err) console.log(error);
|
|
else console.log(body);
|
|
})
|
|
};
|
|
|
|
test(); |