web\Request $parsers

$parsers public property

The parsers for converting the raw HTTP request body into $bodyParams. The array keys are the request Content-Types, and the array values are the corresponding configurations for creating the parser objects. A parser must implement the yii\web\RequestParserInterface.

To enable parsing for JSON requests you can use the yii\web\JsonParser class like in the following example:

[
    'application/json' => 'yii\web\JsonParser',
]

To register a parser for parsing all request types you can use '*' as the array key. This one will be used as a fallback in case no other types match.

See also getBodyParams().

public array $parsers = []
doc_Yii
2016-10-30 17:15:36
Comments
Leave a Comment

Please login to continue.