public function createClient($url = null,
        $method = \Zend\Http\Request::METHOD_GET, $timeout = null
    ) {
        $client = new \Zend\Http\Client();
        $client->setMethod($method);
        if (!empty($this->defaults)) {
            $client->setOptions($this->defaults);
        }
        if (null !== $this->defaultAdapter) {
            $client->setAdapter($this->defaultAdapter);
        }
        if (null !== $url) {
            $client->setUri($url);
        }
        if ($timeout) {
            $client->setOptions(['timeout' => $timeout]);
        }
        $this->proxify($client);
        return $client;
    }
public function createClient($url = null,
        $method = \Zend\Http\Request::METHOD_GET, $timeout = null
    ) {
        $client = new \Zend\Http\Client();
        $client->setMethod($method);
        if (!empty($this->defaults)) {
            $client->setOptions($this->defaults);
        }
        if (null !== $this->defaultAdapter) {
            $client->setAdapter($this->defaultAdapter);
        }
        if (null !== $url) {
            $client->setUri($url);
        }
        if ($timeout) {
            $client->setOptions(['timeout' => $timeout]);
        }
        $this->proxify($client);
        return $client;
    }
public function createClient ( $ url = null , $ method = \ Zend \ Http \ Request :: METHOD_GET , $ timeout = null ) { $ client = new \ Zend \ Http \ Client ( ) ; $ client -> setMethod ( $ method ) ; if ( ! empty ( $ this -> defaults ) ) { $ client -> setOptions ( $ this -> defaults ) ; } if ( null !== $ this -> defaultAdapter ) { $ client -> setAdapter ( $ this -> defaultAdapter ) ; } if ( null !== $ url ) { $ client -> setUri ( $ url ) ; } if ( $ timeout ) { $ client -> setOptions ( [ 'timeout' => $ timeout ] ) ; } $ this -> proxify ( $ client ) ; return $ client ; }
Return a new HTTP client.

@param string $url     Target URL
@param string $method  Request method
@param float  $timeout Request timeout in seconds

@return \Zend\Http\Client
Return a new HTTP client .