/** * Inner write. * * @param Docolight\Http\Contracts\Arrayable $body * @param boolean $replace * * @return \Docolight\Http\Response */ protected function innerWrite(Arrayable $body, $replace = false) { if ($replace === true) { $this->body = $body; } elseif ($replace === false) { $this->body->fill($body->castToArray()); } return $this; }
/** * {@inheritdoc} */ protected function convertToStringRepresentation(Arrayable $body) { return json_encode($body->castToArray()); }