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

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

Open
vscing opened this issue Nov 13, 2023 · 0 comments
Labels
Request think\Request

Comments

@vscing
Copy link

vscing commented Nov 13, 2023

// 执行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(); // 获取不到任何信息
}

@big-dream big-dream added the Request think\Request label Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Request think\Request
Projects
None yet
Development

No branches or pull requests

2 participants