From 5d4246ef9637c0ec7c417dd37a4814960324426c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Fri, 11 Aug 2023 18:26:37 +0800 Subject: [PATCH] qqq --- Handler/OnRequest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Handler/OnRequest.php b/Handler/OnRequest.php index 2dd2281..7b84dea 100644 --- a/Handler/OnRequest.php +++ b/Handler/OnRequest.php @@ -129,7 +129,7 @@ class OnRequest implements OnRequestInterface ->withQueryParams($request->get ?? []) ->withUploadedFiles($request->files ?? []) ->withMethod($request->getMethod()); - $contentType = $serverRequest->header('Content-Type'); + $contentType = $request->header['content-type']; if (str_contains($contentType, 'json')) { $serverRequest->withParsedBody(json_decode($request->post, true)); } else if (str_contains($contentType, 'xml')) {