This commit is contained in:
2023-08-11 18:26:37 +08:00
parent 70539e6b20
commit 5d4246ef96
+1 -1
View File
@@ -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')) {