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

uni.uploadFile() 发送的请求HTTP method有问题 #5284

Open
sicaboy opened this issue Jan 8, 2025 · 0 comments
Open

uni.uploadFile() 发送的请求HTTP method有问题 #5284

sicaboy opened this issue Jan 8, 2025 · 0 comments

Comments

@sicaboy
Copy link

sicaboy commented Jan 8, 2025

uni.uploadFile() 目前发送的请求的http method为小写post,正确应该是大写的POST

原因:

  • 根据HTTP/1.1规范RFC 7231提到,Method名区分大小写,客户端最好用大写。
  • 符合RESTFul的后端,会使用诸如PUT之类的动词,所以未必是POST
    • 许多框架(如Laravel)不支持小写http method。
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