-
Notifications
You must be signed in to change notification settings - Fork 248
Open
Description
Current Behavior
DELETE请求
DELETE /nc_test HTTP/1.1
User-Agent: curl/7.29.0
Host: 127.0.0.1:8399
Content-Type: application/json
Content-Length: 4
Accept: /
X-Forwarded-For: 127.0.0.1
X-Real-Ip: 127.0.0.1
Connection: keep-alive
null
Expected Behavior
nc -l 6666
DELETE /nc_test HTTP/1.1
User-Agent: curl/7.29.0
Host: 127.0.0.1:8399
Content-Type: application/json
Content-Length: 19
Accept: /
X-Forwarded-For: 127.0.0.1
X-Real-Ip: 127.0.0.1
Connection: keep-alive
{
"abc":"abc"
}
Error Logs
No response
Steps to Reproduce
应用插件的代码有一个提前判断,会对非POST和PUT等请求的body设置为null。
查了下资料,HTTP 协议没有为 GET 请求的 body 赋予语义,也就是即不要求也不禁止 GET 请求带 body。
大多数 HTTP 实现从技术上都支持 HTTP GET 请求带 body,少数实现会禁止(google-chrome 浏览器、node-fetch),少数实现会不建议(Fiddler)。
Environment
- APINTO version (run
apinto version): - Operating system (run
uname -a):
Metadata
Metadata
Assignees
Labels
No labels