> For the complete documentation index, see [llms.txt](https://tech.x2bee.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tech.x2bee.com/dev-guide/pjt-prepare/publish-your-docs/store-front-framewok-next.js/04.-data-fetching.md).

# 04. Data Fetching

이번 장에서는 데이터 통신 방법에 대해서 설명합니다.

이전 세대 프레임워크에서는 Rest Api 통신 시에 XMLHTTPRequest 기반의 axios 를 위주로 다루었지만, 최근에는 새로운 Native Javascript 통신 방법인 Fetch API 로 대체되고 있습니다.

Fetch API는 기본적으로 Promise 를 사용하기 때문에 비동기 요청을 더 쉽게 만들고 응답을 더 잘 처리할 수 있게 해줍니다.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://tech.x2bee.com/dev-guide/pjt-prepare/publish-your-docs/store-front-framewok-next.js/04.-data-fetching.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
