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

axios网络请求的封装的自定义header怎么设置? #19

Closed
lishide opened this issue Mar 19, 2024 · 4 comments
Closed

axios网络请求的封装的自定义header怎么设置? #19

lishide opened this issue Mar 19, 2024 · 4 comments

Comments

@lishide
Copy link

lishide commented Mar 19, 2024

axios网络请求的封装的自定义header怎么设置?请给个示例,比如设置token等

@WinWang
Copy link
Owner

WinWang commented Mar 19, 2024

image

@lishide
Copy link
Author

lishide commented Mar 19, 2024

commonHeader 在哪声明的,需要设置多个呢?

@WinWang
Copy link
Owner

WinWang commented Mar 19, 2024

commonHeader就是普通一个AxiosHeader的对象。 let commonHeader = new AxiosHeader() 你说的设置多个是什么意思?commonHeader.set可以多次调用的,例如set(“Token”),set("PhoneType")等

@lishide
Copy link
Author

lishide commented Mar 20, 2024

好的,感谢

@lishide lishide closed this as completed Mar 20, 2024
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

2 participants