public function setRequest(Request $request)
    {
        $this->request = $request;

        $parsedBody = $this->request->getParsedBody();

        if (!empty($parsedBody)) {
            if (is_array($parsedBody)) {
                $this->data = array_map('trim', (array)$parsedBody);
            } else {
                $this->data = $parsedBody;
            }
        }

        return $this;
    }