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

[BUG] GET请求request body没有透传 #1159

Open
fuminchao-at-coupang opened this issue Oct 21, 2024 · 7 comments
Open

[BUG] GET请求request body没有透传 #1159

fuminchao-at-coupang opened this issue Oct 21, 2024 · 7 comments

Comments

@fuminchao-at-coupang
Copy link

att.

@fuminchao-at-coupang fuminchao-at-coupang changed the title [bug] GET请求body没有透传 [BUG] GET请求request body没有透传 Oct 21, 2024
@avwo
Copy link
Owner

avwo commented Oct 22, 2024

get 请求没有 request body

@fuminchao-at-coupang
Copy link
Author

可以有。协议并没有强制规定
https://stackoverflow.com/questions/978061/http-get-with-request-body
而且作为一个man-in-middle, 我认为应该尽可能还原上下游的payload

@fuminchao-at-coupang
Copy link
Author

比如,golang的标准库http就没有限制GET的body

@fuminchao-at-coupang
Copy link
Author

另外curl也支持GET发送body
所以请考虑支持一下

@avwo
Copy link
Owner

avwo commented Oct 24, 2024

node 做了限制,暂时绕不过,你们怎么会用 get 请求发送 body?

@fuminchao-at-coupang
Copy link
Author

@avwo
Copy link
Owner

avwo commented Oct 25, 2024

目前用 Node API 发送 HTTP 请求时会自动忽略 GET 请求的 body,这个问题暂时无解,不过最新的标准貌似把 GET 请求要忽略内容的部分删了,得等后续 Node 版本看看是否会放宽这个限制。

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