public function createHttpClient($baseUri, array $middlewares = [], array $options = [])
    {
        $stack = HandlerStack::create();

        foreach ($middlewares as $middleware) {
            $stack->push($middleware);
        }

        return new Client(array_merge([
            'base_uri' => $baseUri,
            'handler' => $stack,
        ], $options));
    }
public function createHttpClient($baseUri, array $middlewares = [], array $options = [])
    {
        $stack = HandlerStack::create();

        foreach ($middlewares as $middleware) {
            $stack->push($middleware);
        }

        return new Client(array_merge([
            'base_uri' => $baseUri,
            'handler' => $stack,
        ], $options));
    }
public function createHttpClient ( $ baseUri , array $ middlewares = [ ] , array $ options = [ ] ) { $ stack = HandlerStack :: create ( ) ; foreach ( $ middlewares as $ middleware ) { $ stack -> push ( $ middleware ) ; } return new Client ( array_merge ( [ 'base_uri' => $ baseUri , 'handler' => $ stack , ] , $ options ) ) ; }
Method to instantiate a HTTP client.

@param string $baseUri
@param array  $middlewares
@param array  $options

@return ClientInterface
Method to instantiate a HTTP client .