如图所示,我在中间件使用$request->all()出现以上错误。GET请求或者POST请求不传参会报错
两种情况:
图二,看着像http 1.1 协议解析出现问题了,你可以调试一下。 1、看看完整http 协议头是什么样子,感觉解析出现问题了。
感谢,还真是 apipost7 默认加了header
echo $request;输出下请求,我看下协议格式
echo $request;
echo $request; $request->all();
GET /test HTTP/1.1 user-agent: ApiPOST Runtime +https://www.apipost.cn accept: / accept-encoding: gzip, deflate, br connection: keep-alive Host: local.cn:8787 Content-Type: multipart/form-data; boundary=--------------------------341498516111103929360692 Content-Length: 0
POST /test HTTP/1.1 user-agent: ApiPOST Runtime +https://www.apipost.cn accept: / accept-encoding: gzip, deflate, br connection: keep-alive Host: local.cn:8787 Content-Type: multipart/form-data; boundary=--------------------------735848098272388033389979 Content-Length: 0
好的,感谢反馈
图二,看着像http 1.1 协议解析出现问题了,你可以调试一下。
1、看看完整http 协议头是什么样子,感觉解析出现问题了。
感谢,还真是 apipost7 默认加了header
echo $request;
输出下请求,我看下协议格式GET /test HTTP/1.1
user-agent: ApiPOST Runtime +https://www.apipost.cn
accept: /
accept-encoding: gzip, deflate, br
connection: keep-alive
Host: local.cn:8787
Content-Type: multipart/form-data; boundary=--------------------------341498516111103929360692
Content-Length: 0
POST /test HTTP/1.1
user-agent: ApiPOST Runtime +https://www.apipost.cn
accept: /
accept-encoding: gzip, deflate, br
connection: keep-alive
Host: local.cn:8787
Content-Type: multipart/form-data; boundary=--------------------------735848098272388033389979
Content-Length: 0
好的,感谢反馈