public function send($request)
    {

        $this->request = $request;

        switch (strtoupper($request->getVerb())) {
            case 'GET':
                $this->response = $this->get($request);
                break;
            case 'PUT':
                $this->response = $this->put($request);
                break;
            case 'DELETE':
                $this->response = $this->delete($request);
                break;
            case 'POST':
                $this->response = $this->post($request);
                break;
            case 'HEAD':
                $this->response = $this->head($request);
                break;
            default:
                throw new \Exception($verb . ' is an invalid or unsupported REST verb.');
        }
        return $this->response;
    }
public function send($request)
    {

        $this->request = $request;

        switch (strtoupper($request->getVerb())) {
            case 'GET':
                $this->response = $this->get($request);
                break;
            case 'PUT':
                $this->response = $this->put($request);
                break;
            case 'DELETE':
                $this->response = $this->delete($request);
                break;
            case 'POST':
                $this->response = $this->post($request);
                break;
            case 'HEAD':
                $this->response = $this->head($request);
                break;
            default:
                throw new \Exception($verb . ' is an invalid or unsupported REST verb.');
        }
        return $this->response;
    }
public function send ( $ request ) { $ this -> request = $ request ; switch ( strtoupper ( $ request -> getVerb ( ) ) ) { case 'GET' : $ this -> response = $ this -> get ( $ request ) ; break ; case 'PUT' : $ this -> response = $ this -> put ( $ request ) ; break ; case 'DELETE' : $ this -> response = $ this -> delete ( $ request ) ; break ; case 'POST' : $ this -> response = $ this -> post ( $ request ) ; break ; case 'HEAD' : $ this -> response = $ this -> head ( $ request ) ; break ; default : throw new \ Exception ( $ verb . ' is an invalid or unsupported REST verb.' ) ; } return $ this -> response ; }
Send a REST request.

@param RESTRequest request A RESTRequest object
@return RESTResponse A RESTResponse object.
Send a REST request .