public function request(
        $url,
        array $parameters = [],
        $method = SocialConnectClient::GET,
        array $headers = [],
        array $options = []
    ) {
        switch ($method) {
            case SocialConnectClient::GET:
                $response = $this->_client->get(
                    $url,
                    $parameters,
                    ['headers' => $headers]
                );
                break;
            case SocialConnectClient::POST:
                $response = $this->_client->post(
                    $url,
                    $parameters,
                    ['headers' => $headers]
                );
                break;
            case SocialConnectClient::PUT:
                $response = $this->_client->put(
                    $url,
                    $parameters,
                    ['headers' => $headers]
                );
                break;
            case SocialConnectClient::DELETE:
                $response = $this->_client->delete(
                    $url,
                    $parameters,
                    ['headers' => $headers]
                );
                break;
            default:
                throw new InvalidArgumentException("Method {$method} is not supported");
        }

        return new Response(
            $response->getStatusCode(),
            (string)$response->getBody(),
            $response->getHeaders()
        );
    }
public function request(
        $url,
        array $parameters = [],
        $method = SocialConnectClient::GET,
        array $headers = [],
        array $options = []
    ) {
        switch ($method) {
            case SocialConnectClient::GET:
                $response = $this->_client->get(
                    $url,
                    $parameters,
                    ['headers' => $headers]
                );
                break;
            case SocialConnectClient::POST:
                $response = $this->_client->post(
                    $url,
                    $parameters,
                    ['headers' => $headers]
                );
                break;
            case SocialConnectClient::PUT:
                $response = $this->_client->put(
                    $url,
                    $parameters,
                    ['headers' => $headers]
                );
                break;
            case SocialConnectClient::DELETE:
                $response = $this->_client->delete(
                    $url,
                    $parameters,
                    ['headers' => $headers]
                );
                break;
            default:
                throw new InvalidArgumentException("Method {$method} is not supported");
        }

        return new Response(
            $response->getStatusCode(),
            (string)$response->getBody(),
            $response->getHeaders()
        );
    }
public function request ( $ url , array $ parameters = [ ] , $ method = SocialConnectClient :: GET , array $ headers = [ ] , array $ options = [ ] ) { switch ( $ method ) { case SocialConnectClient :: GET : $ response = $ this -> _client -> get ( $ url , $ parameters , [ 'headers' => $ headers ] ) ; break ; case SocialConnectClient :: POST : $ response = $ this -> _client -> post ( $ url , $ parameters , [ 'headers' => $ headers ] ) ; break ; case SocialConnectClient :: PUT : $ response = $ this -> _client -> put ( $ url , $ parameters , [ 'headers' => $ headers ] ) ; break ; case SocialConnectClient :: DELETE : $ response = $ this -> _client -> delete ( $ url , $ parameters , [ 'headers' => $ headers ] ) ; break ; default : throw new InvalidArgumentException ( "Method {$method} is not supported" ) ; } return new Response ( $ response -> getStatusCode ( ) , ( string ) $ response -> getBody ( ) , $ response -> getHeaders ( ) ) ; }
Request specify url.

@param string $url Request URL.
@param array $parameters Request parameters.
@param string $method Request method.
@param array $headers Request headers.
@param array $options Unused.

@return \SocialConnect\Common\Http\Response
Request specify url .