Skip to content

Commit 2f0a524

Browse files
committed
Use parsed body if present
1 parent 16c56cc commit 2f0a524

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Context.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,6 @@ public function filter(string $name): ?string
9292
*/
9393
public function getBody(): ?array
9494
{
95-
return json_decode($this->request->getBody()->getContents(), true);
95+
return $this->request->getParsedBody() ?: json_decode($this->request->getBody()->getContents(), true);
9696
}
9797
}

src/Extension/Atomic.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function handle(Context $context): ?Response
5050
throw new MethodNotAllowedException();
5151
}
5252

53-
$body = $request->getParsedBody();
53+
$body = $context->getBody();
5454
$operations = $body['atomic:operations'] ?? null;
5555

5656
if (! is_array($operations)) {

0 commit comments

Comments
 (0)