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

如何给单独请求添加headers #399

Closed
Fhasghrge opened this issue Nov 22, 2023 · 1 comment
Closed

如何给单独请求添加headers #399

Fhasghrge opened this issue Nov 22, 2023 · 1 comment
Labels
question Further information is requested

Comments

@Fhasghrge
Copy link

全局添加headers可以通过重写pont的方式完成;但目前部分接口请求需要添加headers,这种情况下如何传headers?

@z979054461
Copy link
Collaborator

如果是使用PontCore,request(params, options = {}),直接把headers传到options里,PontCore调用的fetch,参考https://developer.mozilla.org/zh-CN/docs/Web/API/fetch

如果是自定义的请求方法,需要自己修改模板实现(templatePath)

@z979054461 z979054461 added the question Further information is requested label Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants