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;
    }
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;
    }
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 ; }
Parse the body based on the content type.

@return mixed
@throws \RuntimeException if parsing isn't supported for the content-type
Parse the body based on the content type .