public function sendRequest(RequestEvent $event)
    {
        switch ($event->getMethod()) {
            case 'GET':
                $response = $this->getHttpClient()->getAdapter()->get($event->getRequest());
                break;
            case 'HEAD':
                $response = $this->getHttpClient()->getAdapter()->head($event->getRequest());
                break;
            case 'POST':
                $response = $this->getHttpClient()->getAdapter()->post($event->getRequest());
                break;
            case 'PUT':
                $response = $this->getHttpClient()->getAdapter()->put($event->getRequest());
                break;
            case 'PATCH':
                $response = $this->getHttpClient()->getAdapter()->patch($event->getRequest());
                break;
            case 'DELETE':
                $response = $this->getHttpClient()->getAdapter()->delete($event->getRequest());
                break;
            default:
                throw new RuntimeException(sprintf('Unknown request method "%s".', $event->getMethod()));
        }

        return $response;
    }
public function sendRequest(RequestEvent $event)
    {
        switch ($event->getMethod()) {
            case 'GET':
                $response = $this->getHttpClient()->getAdapter()->get($event->getRequest());
                break;
            case 'HEAD':
                $response = $this->getHttpClient()->getAdapter()->head($event->getRequest());
                break;
            case 'POST':
                $response = $this->getHttpClient()->getAdapter()->post($event->getRequest());
                break;
            case 'PUT':
                $response = $this->getHttpClient()->getAdapter()->put($event->getRequest());
                break;
            case 'PATCH':
                $response = $this->getHttpClient()->getAdapter()->patch($event->getRequest());
                break;
            case 'DELETE':
                $response = $this->getHttpClient()->getAdapter()->delete($event->getRequest());
                break;
            default:
                throw new RuntimeException(sprintf('Unknown request method "%s".', $event->getMethod()));
        }

        return $response;
    }
public function sendRequest ( RequestEvent $ event ) { switch ( $ event -> getMethod ( ) ) { case 'GET' : $ response = $ this -> getHttpClient ( ) -> getAdapter ( ) -> get ( $ event -> getRequest ( ) ) ; break ; case 'HEAD' : $ response = $ this -> getHttpClient ( ) -> getAdapter ( ) -> head ( $ event -> getRequest ( ) ) ; break ; case 'POST' : $ response = $ this -> getHttpClient ( ) -> getAdapter ( ) -> post ( $ event -> getRequest ( ) ) ; break ; case 'PUT' : $ response = $ this -> getHttpClient ( ) -> getAdapter ( ) -> put ( $ event -> getRequest ( ) ) ; break ; case 'PATCH' : $ response = $ this -> getHttpClient ( ) -> getAdapter ( ) -> patch ( $ event -> getRequest ( ) ) ; break ; case 'DELETE' : $ response = $ this -> getHttpClient ( ) -> getAdapter ( ) -> delete ( $ event -> getRequest ( ) ) ; break ; default : throw new RuntimeException ( sprintf ( 'Unknown request method "%s".' , $ event -> getMethod ( ) ) ) ; } return $ response ; }
Call upon the adapter to create an response object

@param  RequestEvent $event
@throws \Exception
@return Response
Call upon the adapter to create an response object