framework icon indicating copy to clipboard operation
framework copied to clipboard

thinkphp8.03 为某个应用定义不同的请求对象 中间件获取不到header信息

Open vscing opened this issue 2 years ago • 0 comments

// 执行HTTP应用并响应 $request = new app\common\Request(); $http = (new App())->http; $response = $http->run($request); $response->send(); $http->end($response);

自定义Request类,在中间件 public function handle(Request $request, \Closure $next): Response { $request->header(); // 获取不到任何信息 }

vscing avatar Nov 13 '23 12:11 vscing