🚀 مُصادَق: تحديث برمجي جديد 2026-05-03 02:16

This commit is contained in:
Hamza-Ayed
2026-05-03 02:16:47 +03:00
parent adb262c6b8
commit 355fb45935
4 changed files with 31 additions and 8 deletions

View File

@@ -25,8 +25,8 @@ final class Request
$this->queryParams = $_GET;
$this->files = $_FILES;
$contentType = $this->getHeader('Content-Type');
if ($contentType && str_contains($contentType, 'application/json')) {
$contentType = $this->getHeader('Content-Type') ?? $_SERVER['CONTENT_TYPE'] ?? '';
if ($contentType && str_contains(strtolower($contentType), 'application/json')) {
$this->body = json_decode(file_get_contents('php://input'), true) ?? [];
} else {
$this->body = $_POST;