- Added basic handling of BODY content from Web-RestMethod from PS
This commit is contained in:
parent
83fee32ac0
commit
ceebc6783a
|
@ -35,6 +35,14 @@ class FormContext implements FormContextInterface
|
|||
|
||||
$this->values = $request->getParsedBody() ?: [];
|
||||
|
||||
if ( ! $this->values ) {
|
||||
$content = utf8_encode((string) $request->getBody());
|
||||
|
||||
if ( $content && ( $json = json_decode($content, true) ) ) {
|
||||
$this->values = $json;
|
||||
}
|
||||
}
|
||||
|
||||
$this->files = $request->getUploadedFiles() ?: [];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue