RequestParserInterface
API reference › yii › web › RequestParserInterface
Implemented by 2 types
Interface for classes that parse the raw request body into a parameters array.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
parse() abstract | Parses a HTTP request body. | RequestParserInterface |
Method details
Section titled “Method details”parse()
Section titled “parse() ”abstract public function parse(string $rawBody, string $contentType): mixedParses a HTTP request body.
Parameters
| Parameter | Type | Description |
|---|---|---|
$rawBody | string | The raw HTTP request body. |
$contentType | string | The content type specified for the request body. |
Returns
mixed: Parameters parsed from the request body