import axios from 'axios'
// GET : Fetch a list of data
axios.get(`url`)
.then(function1)
.catch(ErrorHandlingFunction)
.finally(function2);
// POST : Create new data
axios.post(`url`, {json})
.then(function1)
.catch(ErrorHandlingFunction)
.finally(function2);
// PUT : Update data
axios.put(`url`, {json})
.then(function1)
.catch(ErrorHandlingFunction)
.finally(function2);
// DELETE : Delete data
axios.put(`url`)
.then(function1)
.catch(ErrorHandlingFunction)
.finally(function2);
/* URL 구성방식
/users [GET] # Fetch a list of users
/users [POST] # Create new user
/users/123 [PUT] # Update user
/users/123 [DELETE] # remove user
*/