Skip to content
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

axiox.get next.js api 통신 params 오류 #4

Open
Avoler0 opened this issue Oct 22, 2022 · 0 comments
Open

axiox.get next.js api 통신 params 오류 #4

Avoler0 opened this issue Oct 22, 2022 · 0 comments

Comments

@Avoler0
Copy link
Owner

Avoler0 commented Oct 22, 2022

params = {
ids:{
start:0,
end:20
}
}
위의 params 객체로 axios.get을 통해 next.js api와 통신시 '?ids[start]=0&ids[end]=20' 처리가 됩니다.
param가 직렬화 되지 않아 오류가 있음 paramsSerializer 설정이 타입스크립트 때문인지 작동이 안됨

axios/axios#5142 정확히는 모르지만 수정을 하니 작동은 하지만
직열화는 되지 않습니다.
axios/axios#5108 업데이트 도중 오류가 난것 같다.

해결 endpoint를 params로 혼동하여 query에 주어 오류가 났습니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant