Unverified Commit 9b599ae5 authored by Mateu Aguiló Bosch's avatar Mateu Aguiló Bosch
Browse files

fix(Normalizers): Serialize body string

parent 5a389ac8
...@@ -3,9 +3,6 @@ ...@@ -3,9 +3,6 @@
namespace Drupal\subrequests\Normalizer; namespace Drupal\subrequests\Normalizer;
use Drupal\Component\Serialization\Json; use Drupal\Component\Serialization\Json;
use Drupal\Component\Utility\NestedArray;
use Drupal\subrequests\Blueprint\Parser;
use Drupal\subrequests\Blueprint\RequestTree;
use Drupal\subrequests\Subrequest; use Drupal\subrequests\Subrequest;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
...@@ -46,10 +43,10 @@ class JsonSubrequestDenormalizer implements DenormalizerInterface { ...@@ -46,10 +43,10 @@ class JsonSubrequestDenormalizer implements DenormalizerInterface {
$path, $path,
static::getMethodFromAction($data->action), static::getMethodFromAction($data->action),
empty($data->body) ? $query : $data->body, empty($data->body) ? $query : $data->body,
$master_request->cookies ? (array) $master_request->cookies->getIterator() : [], $master_request->cookies ? $master_request->cookies->all() : [],
$master_request->files ? (array) $master_request->files->getIterator() : [], $master_request->files ? $master_request->files->all() : [],
[], [],
empty($data->body) ? '' : $data->body empty($data->body) ? '' : Json::encode($data->body)
); );
// Maintain the same session as in the master request. // Maintain the same session as in the master request.
$session = $master_request->getSession(); $session = $master_request->getSession();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment