src/GoogleMoviesClient/HttpClient/HttpClient.php
private function send($path, $method, array $parameters = [], array $headers = [], $body = null)
    {
        $request = $this->createRequest($path, $method, $parameters, $headers, $body);

        $event = new RequestEvent($request);
        $this->eventDispatcher->dispatch(GoogleMoviesClientEvents::REQUEST, $event);

        $this->lastResponse = $event->getResponse();

        if ($this->lastResponse instanceof Response) {
            return (string) $this->lastResponse->getBody();
        }

        return [];
    }
private function send($path, $method, array $parameters = [], array $headers = [], $body = null)
    {
        $request = $this->createRequest($path, $method, $parameters, $headers, $body);

        $event = new RequestEvent($request);
        $this->eventDispatcher->dispatch(GoogleMoviesClientEvents::REQUEST, $event);

        $this->lastResponse = $event->getResponse();

        if ($this->lastResponse instanceof Response) {
            return (string) $this->lastResponse->getBody();
        }

        return [];
    }
private function send ( $ path , $ method , array $ parameters = [ ] , array $ headers = [ ] , $ body = null ) { $ request = $ this -> createRequest ( $ path , $ method , $ parameters , $ headers , $ body ) ; $ event = new RequestEvent ( $ request ) ; $ this -> eventDispatcher -> dispatch ( GoogleMoviesClientEvents :: REQUEST , $ event ) ; $ this -> lastResponse = $ event -> getResponse ( ) ; if ( $ this -> lastResponse instanceof Response ) { return ( string ) $ this -> lastResponse -> getBody ( ) ; } return [ ] ; }
Create the request object and send it out to listening events.

@param       $path
@param       $method
@param array $parameters
@param array $headers
@param null  $body

@return string
Create the request object and send it out to listening events .