protected function parseBody()
    {
        $data = null;
        
        switch ($this->getContentType()) {
            case 'application/x-www-form-urlencoded':
                $data = $this->parseUrlEncodedBody();
                break;
            case 'application/json':
                $data = $this->parseJsonBody();
                break;
            case 'text/xml':
            case 'application/xml':
                $data = $this->parseXmlBody();
                break;
            case 'multipart/form-data':
                throw new \RuntimeException("Parsing multipart/form-data isn't supported");
        }
        
        return $data;
    }