분류
Nodejs
gh-got - GitHub API와 상호 작용할 수 있는 편리한 래퍼.
본문
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' })();
- 이전글axios - 약속 기반 HTTP 클라이언트 (브라우저에서도 작동). 19.03.07
- 다음글got - 내장 된 HTTP 모듈에 좋은 인터페이스. 19.03.07