https://github.com/sindresorhus/gh-got
const got = require('got'); const token = 'foo'; (async () => { const {body} = await got('https://api.github.com/users/sindresorhus', { json: true, headers: { 'accept': 'application/vnd.github.v3+json', 'authorization': `token ${token}` } }); console.log(body.login); //=> 'sindresorhus' })();
등록된 댓글이 없습니다.