public function getParsedBody()
    {
        if ($this->parsedBody || !$this->body) {
            return $this->parsedBody;
        }
        $type = $this->headers->getContentType();
        $body = (string)$this->getBody();
        switch ($type) {
            case 'application/json':
                $this->parsedBody = json_decode($body, true);
                break;
            case 'application/x-www-form-urlencoded':
                parse_str($body, $data);
                $this->parsedBody = $data;
                break;
            case 'text/xml':
                $disabled = libxml_disable_entity_loader(true);
                $xml = simplexml_load_string($body);
                libxml_disable_entity_loader($disabled);
                $this->parsedBody = $xml;
                break;
            default:
                break;
        }
        return $this->parsedBody;
    }