public function iSendARequest($method, $url)
    {
        $url = $this->prepareUrl($url);

        if (version_compare(ClientInterface::VERSION, '6.0', '>=')) {
            $this->request = new Request($method, $url, $this->headers);
        } else {
            $this->request = $this->getClient()->createRequest($method, $url);
            if (!empty($this->headers)) {
                $this->request->addHeaders($this->headers);
            }
        }

        $this->sendRequest();
    }
public function iSendARequest($method, $url)
    {
        $url = $this->prepareUrl($url);

        if (version_compare(ClientInterface::VERSION, '6.0', '>=')) {
            $this->request = new Request($method, $url, $this->headers);
        } else {
            $this->request = $this->getClient()->createRequest($method, $url);
            if (!empty($this->headers)) {
                $this->request->addHeaders($this->headers);
            }
        }

        $this->sendRequest();
    }
public function iSendARequest ( $ method , $ url ) { $ url = $ this -> prepareUrl ( $ url ) ; if ( version_compare ( ClientInterface :: VERSION , '6.0' , '>=' ) ) { $ this -> request = new Request ( $ method , $ url , $ this -> headers ) ; } else { $ this -> request = $ this -> getClient ( ) -> createRequest ( $ method , $ url ) ; if ( ! empty ( $ this -> headers ) ) { $ this -> request -> addHeaders ( $ this -> headers ) ; } } $ this -> sendRequest ( ) ; }
Sends HTTP request to specific relative URL.

@param string $method request method
@param string $url    relative url

@When /^(?:I )?send a ([A-Z]+) request to "([^"]+)"$/
Sends HTTP request to specific relative URL .