protected function setRestBodyType($type)
    {
        $type = strtolower($type);
        switch ($type) {
            case 'json':
            case 'xml':
                $this->restBodyType = $type;
                break;

            default:
                throw new \Exception("REST body type '$type' not suported");
        }
    }
protected function setRestBodyType($type)
    {
        $type = strtolower($type);
        switch ($type) {
            case 'json':
            case 'xml':
                $this->restBodyType = $type;
                break;

            default:
                throw new \Exception("REST body type '$type' not suported");
        }
    }
protected function setRestBodyType ( $ type ) { $ type = strtolower ( $ type ) ; switch ( $ type ) { case 'json' : case 'xml' : $ this -> restBodyType = $ type ; break ; default : throw new \ Exception ( "REST body type '$type' not suported" ) ; } }
Set body type of requests and responses.

@param string $type Type of the REST body
Set body type of requests and responses .