20 lines
634 B
Markdown
20 lines
634 B
Markdown
---
|
|
title: 효율적인 API 통신 패턴 (Axios & Interceptors)
|
|
category: Software Architecture
|
|
tags: [API, Axios, Interceptor, Error Handling, Network]
|
|
created: 2026-04-20
|
|
---
|
|
|
|
# 효율적인 API 통신 패턴
|
|
|
|
## 📡 인프라 설계
|
|
- **Service Layer**: API 호출 로직을 컴포넌트와 분리하여 별도 모듈화.
|
|
- **Interceptors**: 전역 요청 헤더 주입 및 전역 에러 핸들링.
|
|
|
|
## 🚨 에러 대응
|
|
401(토큰 만료), 500(서버 장애) 등 공통 에러에 대한 중앙 집중형 대응 시나리오 수립.
|
|
|
|
## 🔗 연결된 지식
|
|
- [[System_Protocol_Standard]]
|
|
- [[React_State_Management_Strategy]]
|