Axios API

axios({
	method: 'post',
	url: '/user/12345',
	data: { x: 1 }
});

axios.post('/user', { x: 1 })
	.then(res => console.log(res))
	.catch(err => console.log(err));

Response Schema

{
	data: {}, // response that was provided by the server
	status: 200,
	statusText: 'OK',
	headers: {}, // HTTP headers that the server responded with 
	config: {}, // provided to axios for the request
	request: {} // 
} 

axios.get('/user/12345')
	.then(res => {
		console.log(res.data);
		console.log(res.status);
		console.log(res.statusText);
		console.log(res.headers);
		console.log(res.config);
	});

defined ERROR

문제 상황

Untitled


정답 plz...

API 호출 & handling