From c2aa3ae44a0984783ef4f6c89154db7e870a671a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Sun, 1 Aug 2021 15:19:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HttpServer/Http/HttpParams.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/HttpServer/Http/HttpParams.php b/HttpServer/Http/HttpParams.php index ad360724..529cccf1 100644 --- a/HttpServer/Http/HttpParams.php +++ b/HttpServer/Http/HttpParams.php @@ -113,9 +113,9 @@ class HttpParams } $context_type = $contextType->headers->getContentType(); if (str_contains($context_type, 'json')) { - $this->setPosts(json_decode($content)); + $this->addPosts(json_decode($content, true)); } else if (str_contains($context_type, 'xml')) { - $this->setPosts(Xml::toArray($content)); + $this->addPosts(Xml::toArray($content)); } else { $this->_rawContent = $content; }