문법
	//문법
	fetch('url',{data})
    
    
    // json 형태 데이터 통신 기준 
    //get
    
    fetch('url').then(response=>response.json())
    .then(data => console.log(data))
    
    //Post 예시
    
    fetch('url',{
    	method: 'POST',
        headers: {
        'Content-Type': 'application/json'
        },
        bdoy: JSON.stringify({
        	data: '보내고 싶은거'
        })
    }).then(response=>response.json())
    .then(data=>console.log(data))
    
	1.  http 메서드 옵션에 붙이기
    
      axios('url', {
        // 설정 옵션
      });
      
      // Post 예시
      axios('url',{
        method: 'POST',
        headers: {
          'Content-Type': 'application/json'
        },
        bdoy: JSON.stringify({
          data: '보내고 싶은거'
      })
      
   2. 아래와 같이 HTTP 메서드를 붙일 수도 있습니다.
   
      // POST 통신
      axios.post(url, {
        headers: {
        	'Content-Type': 'application/json'
        },
        body: JSON.stringify({
        	data: '보내고싶은거'
      }).then(response=> console.log(response.data))
      
      
      
fetch와 axios의 차이
const url = "https://jsonplaceholder.typicode.com/todos";
const todo = {
  title: "A new todo",
  completed: false,
};
axios
  .post(url, {
    headers: {
      "Content-Type": "application/json",
    },
    data: todo,
  })
  .then(console.log);
fetch일 경우 JSON.stringify로 문자열로 변환해야 한다.
const url = "https://jsonplaceholder.typicode.com/todos";
const todo = {
  title: "A new todo",
  completed: false,
};
fetch(url, {
    headers: {
      "Content-Type": "application/json",
    },
    data: JSON.stringify(todo),
  })
  .then(response=>response.json())
  .then(data=>console.log(data);