ajax (1) 썸네일형 리스트형 [JavaScript] Fetch API Fetch API javascript에서 비동기 HTTP 요청을 보내는 방법 jQuery를 사용하지 않는 추세라 fetch를 많이 사용함 형식: fetch(url, [options/method, headers, ...]) Fetch API를 사용해서 비동기 HTTP 요청 보내기 1. GET 요청 function addBookmark(movie_id) { fetch("/movie/addBookmark?movie_id=" + movie_id) .then(response => response.text()) .then(response => { if(response == "success") { location.reload(); } else { alert("My List 추가에 실패하였습니다."); } }); } .. 이전 1 다음