webman不支持接收application/octet-stream的数据流?【已解决】

pole

问题描述

webman是不是不支持接收Content-Type: application/octet-stream的数据流?
Request Header请求头Content-Type: application/octet-stream,请求方法:POST。用PHP原生代码var_dump(file_get_content('php://input'));可以正常获取数据流
但是在webman中file_get_content('php://input'),就为空。

正确姿势:$request->rawBody();

614 1 0
1个回答

keytehu
  • pole 2023-04-21

    太感谢了,搞了一天,确实我自己就是最大的BUG。向大佬学习

年代过于久远,无法发表回答
🔝