Middleware for parsing various data formats
RequestBodyParserto your middleware stack.
- Obtain parsed body via
By default, it parses
application/json requests where JSON is in the body.
You can add your own parser by implementing
ParserInterface, adding it into the container and registering it within
$requestBodyParser = $requestBodyParser->withParser('application/myformat', MyFormatParser::class);
The package is tested with PHPUnit. To run tests:
The package tests are checked with Infection mutation framework. To run it:
The code is statically analyzed with Psalm. To run static analysis:
The Yii Request Body Parser is free software. It is released under the terms of the BSD License.
LICENSE for more information.
Maintained by Yii Software.