Core/src/RequestWrapper.php
private function applyHeaders(RequestInterface $request)
    {
        $headers = [
            'User-Agent' => 'gcloud-php/' . $this->componentVersion,
            'x-goog-api-client' => 'gl-php/' . PHP_VERSION . ' gccl/' . $this->componentVersion,
        ];

        if ($this->shouldSignRequest) {
            $headers['Authorization'] = 'Bearer ' . $this->getToken();
        }

        return Psr7\modify_request($request, ['set_headers' => $headers]);
    }
private function applyHeaders(RequestInterface $request)
    {
        $headers = [
            'User-Agent' => 'gcloud-php/' . $this->componentVersion,
            'x-goog-api-client' => 'gl-php/' . PHP_VERSION . ' gccl/' . $this->componentVersion,
        ];

        if ($this->shouldSignRequest) {
            $headers['Authorization'] = 'Bearer ' . $this->getToken();
        }

        return Psr7\modify_request($request, ['set_headers' => $headers]);
    }
private function applyHeaders ( RequestInterface $ request ) { $ headers = [ 'User-Agent' => 'gcloud-php/' . $ this -> componentVersion , 'x-goog-api-client' => 'gl-php/' . PHP_VERSION . ' gccl/' . $ this -> componentVersion , ] ; if ( $ this -> shouldSignRequest ) { $ headers [ 'Authorization' ] = 'Bearer ' . $ this -> getToken ( ) ; } return Psr7 \ modify_request ( $ request , [ 'set_headers' => $ headers ] ) ; }
Applies headers to the request.

@param RequestInterface $request A PSR-7 request.
@return RequestInterface
Applies headers to the request .