Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
subrequests
Commits
9b599ae5
Unverified
Commit
9b599ae5
authored
Sep 15, 2017
by
Mateu Aguiló Bosch
Browse files
fix(Normalizers): Serialize body string
parent
5a389ac8
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Normalizer/JsonSubrequestDenormalizer.php
View file @
9b599ae5
...
...
@@ -3,9 +3,6 @@
namespace
Drupal\subrequests\Normalizer
;
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
Symfony\Component\HttpFoundation\Request
;
use
Symfony\Component\Serializer\Normalizer\DenormalizerInterface
;
...
...
@@ -46,10 +43,10 @@ class JsonSubrequestDenormalizer implements DenormalizerInterface {
$path
,
static
::
getMethodFromAction
(
$data
->
action
),
empty
(
$data
->
body
)
?
$query
:
$data
->
body
,
$master_request
->
cookies
?
(
array
)
$master_request
->
cookies
->
getIterator
()
:
[],
$master_request
->
files
?
(
array
)
$master_request
->
files
->
getIterator
()
:
[],
$master_request
->
cookies
?
$master_request
->
cookies
->
all
()
:
[],
$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.
$session
=
$master_request
->
getSession
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment