public function prepareResponse()
    {
        if (!$this->writer) {
            $this->writer = $this->writerFactory->getWriterFor(
                $this->request->getFormats()
            );
        }
        $this->preparedResponse = $this->writer->format($this->getBody(), $this->responseName);
        return $this;
    }