Method
FormBody::input
php://input: an url-encoded body's bytes, still readable after parsing; a multipart one's are used up by the parser, as in PHP.
Description#
public FormBody::input(): StreamInterfaceReturn values#
StreamInterface
Examples#
use phasync\Psr\StringStream;
use Swerve\Psr\FormBody;
$form = FormBody::for('POST', 'application/x-www-form-urlencoded', new StringStream('a=1&b=2'));
var_export($form->fields());
echo "\n";
echo $form->input()->getContents(), "\n"; // php://input: still readable after parsingOutput
array ( 'a' => '1', 'b' => '2', ) a=1&b=2