PageRenderTime 21ms CodeModel.GetById 18ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/library/Google/vendor/google/auth/src/HttpHandler/Guzzle6HttpHandler.php

https://gitlab.com/vangtrangbac123/zinkaiuit.tk
PHP | 36 lines | 17 code | 5 blank | 14 comment | 0 complexity | 326b39b7229d474548c23117ad92a458 MD5 | raw file
 1<?php
 2
 3namespace Google\Auth\HttpHandler;
 4
 5use GuzzleHttp\ClientInterface;
 6use Psr\Http\Message\RequestInterface;
 7use Psr\Http\Message\ResponseInterface;
 8
 9class Guzzle6HttpHandler
10{
11    /**
12     * @var ClientInterface
13     */
14    private $client;
15
16    /**
17     * @param ClientInterface $client
18     */
19    public function __construct(ClientInterface $client)
20    {
21        $this->client = $client;
22    }
23
24    /**
25     * Accepts a PSR-7 request and an array of options and returns a PSR-7 response.
26     *
27     * @param RequestInterface $request
28     * @param array $options
29     *
30     * @return ResponseInterface
31     */
32    public function __invoke(RequestInterface $request, array $options = [])
33    {
34        return $this->client->send($request, $options);
35    }
36}