/var/www/hkosl.com/b2b2c/webadmin/libraies/google/auth/src/HttpHandler/Guzzle6HttpHandler.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php

namespace Google\Auth\HttpHandler;

use 
GuzzleHttp\ClientInterface;
use 
Psr\Http\Message\RequestInterface;
use 
Psr\Http\Message\ResponseInterface;

class 
Guzzle6HttpHandler
{
    
/**
     * @var ClientInterface
     */
    
private $client;

    
/**
     * @param ClientInterface $client
     */
    
public function __construct(ClientInterface $client)
    {
        
$this->client $client;
    }

    
/**
     * Accepts a PSR-7 request and an array of options and returns a PSR-7 response.
     *
     * @param RequestInterface $request
     * @param array $options
     *
     * @return ResponseInterface
     */
    
public function __invoke(RequestInterface $request, array $options = [])
    {
        return 
$this->client->send($request$options);
    }
}