2. RestApiUitl 기본 사용
1. Server Component 예시
import { COMMON } from '@/constants/x2beeConstants';
import { restApiUtil } from 'x2bee-core';
const Home = async () => {
const response = await restApiUtil
.get(COMMON.API_URL + '/api/display/v1/shop/1?dispMediaCd=20');
console.log(response);
return (
<div>
<h1>Home</h1>
</div>
);
};
export default Home;

2. Client Component 예시

3. restApiUtil 제공 함수 종류
함수
설명
4. restApiUtil Parameter (파라미터)
이름
설명
마지막 업데이트