Skip to content

Instantly share code, notes, and snippets.

View thiagocordeiro's full-sized avatar
🥵
Melting

Thiago Cordeiro thiagocordeiro

🥵
Melting
View GitHub Profile
@thiagocordeiro
thiagocordeiro / request.js
Last active August 20, 2019 07:25
Axios HTTP Client
const axios = require('axios');
axios.get('/users/12345')
.then(function (response) {
const statusCode = response.status;
// successful request/response
})
.catch(function (error) {
const statusCode = error.response.status;