Class yii\httpclient\JsonFormatter

Inheritanceyii\httpclient\JsonFormatter » yii\base\BaseObject
Implementsyii\httpclient\FormatterInterface
Available since version2.0

JsonFormatter formats HTTP message as JSON.

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$encodeOptions integer The encoding options. yii\httpclient\JsonFormatter

Public Methods

Hide inherited methods

MethodDescriptionDefined By
format() Formats given HTTP request message. yii\httpclient\JsonFormatter

Property Details

$encodeOptions public property

The encoding options. For more details please refer to http://www.php.net/manual/en/function.json-encode.php.

Method Details

format() public method

Formats given HTTP request message.

public yii\httpclient\Request format ( yii\httpclient\Request $request )
$request yii\httpclient\Request

HTTP request instance.

return yii\httpclient\Request

Formatted request.