JavaScript에서 HTTP 요청을 하려면 XMLHttpRequest 개체 또는 최신 fetch() API를 사용할 수 있습니다. 다음은 XMLHttpRequest를 사용하여 GET 요청을 만들어 서버에서 일부 데이터를 검색하는 예입니다. var xhr = new XMLHttpRequest(); xhr.open('GET', 'https://www.example.com/data.json', true); xhr.onload = function() { if (this.status == 200) { var data = JSON.parse(this.response); // Do something with the data } }; xhr.send(); 다음은 동일한 GET 요청을 만들기 위해 fetch()를 사..