프로그래밍/Frontend
크롬브라우저 개발자도구에서 POST로 API 호출하는 방법
크롬브라우저 개발자도구에서 POST로 API 호출하는 방법// 전달할 데이터 포맷을 설정합니다 // 데이터 설정 예시const formData = new FormData();formData.append('id', 2); formData.append('mode', 'insert'); formData.append('page', 1); formData.append('etc', null);// POST로 API 호출fetch('{API URL 작성}', { method: 'POST', body: formData}) .then(response => response.text()) .then(data => console.log(data)) .catch(error => console.error('E..