-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refact: apiV1Instance Auth설정 수정 #60
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
굿! 👍 코멘트 하나 남겨두었습니다! 시간되실때 확인부탁드려요 😄
|
||
const apiV1Instance = axios.create({ | ||
baseURL: process.env.NEXT_PUBLIC_API, | ||
headers: { | ||
'Content-Type': 'application/json', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Content-Type 옵션은 header에 기존처럼 명시해주시는게 좋습니다. 해당 api 요청이 body에 어떤 정보를 담고 있는지 headers 옵션을 주는 것이 권장되는 방식으로 알고 있습니다 :)
참고 링크)
https://github.com/axios/axios#-html-form-posting-browser
🛠️ 변경사항
☝️ 유의사항
❗체크리스트