--- title: "동기식 GET/POST 요청 보내기" slug: "xhr-get-post" updated: 2025-08-26T07:13:37Z published: 2025-08-26T07:13:37Z canonical: "helpcenter.autify.com/xhr-get-post" --- > ## Documentation Index > Fetch the complete documentation index at: https://helpcenter.autify.com/llms.txt > Use this file to discover all available pages before exploring further. # 동기식 GET/POST 요청 보내기 지정된 API 엔드포인트에 GET/POST 요청을 보냅니다. 이 코드들은 샘플이므로, 요청할 API의 사양에 맞게 헤더와 본문에 적절한 값을 설정하세요. ## **지정된 URL에 GET 요청 보내기** ```typescript const url = "API URL"; // Send GET request const response = await page.request.get(url); // Check status code if (response.status() !== 200) {  throw new Error("Error " + response.status()); } // Parse JSON and output log const data = await response.json(); console.log(data); ``` ## **지정된 URL에 POST 요청 보내기** ```typescript const url = "API URL"; // Send POST request const response = await page.request.post(url, {  headers: {    "Content-Type": "application/x-www-form-urlencoded",  },  data: "key=value",  // Form data }); // Check status code if (response.status() !== 200) {  throw new Error("Error " + response.status()); } // Parse JSON and output log const data = await response.json(); console.log(data); ```