lithium\net\http\Message::_encode()

protected method

Encode the body based on the content type

Parameters

  • mixed $body

Returns

string

Source

	protected function _encode($body) {
		$media = $this->_classes['media'];

		if ($media::type($this->_type)) {
			$encoded = $media::encode($this->_type, $body);
			$body = $encoded !== null ? $encoded : $body;
		}
		return $body;
	}