src/TheTVDbAPI.php
public function requestHeaders($method, $path, array $options = []): array
    {
        $options = $this->getDefaultHttpClientOptions($options);

        /* @type Response $response */
        $response = $this->httpClient->{$method}($path, $options);

        if ($response->getStatusCode() === 401) {
            throw UnauthorizedException::invalidToken();
        } elseif ($response->getStatusCode() === 404) {
            throw ResourceNotFoundException::notFound($path, $options);
        }

        return $response->getHeaders();
    }
public function requestHeaders($method, $path, array $options = []): array
    {
        $options = $this->getDefaultHttpClientOptions($options);

        /* @type Response $response */
        $response = $this->httpClient->{$method}($path, $options);

        if ($response->getStatusCode() === 401) {
            throw UnauthorizedException::invalidToken();
        } elseif ($response->getStatusCode() === 404) {
            throw ResourceNotFoundException::notFound($path, $options);
        }

        return $response->getHeaders();
    }
public function requestHeaders ( $ method , $ path , array $ options = [ ] ) : array { $ options = $ this -> getDefaultHttpClientOptions ( $ options ) ; /* @type Response $response */ $ response = $ this -> httpClient -> { $ method } ( $ path , $ options ) ; if ( $ response -> getStatusCode ( ) === 401 ) { throw UnauthorizedException :: invalidToken ( ) ; } elseif ( $ response -> getStatusCode ( ) === 404 ) { throw ResourceNotFoundException :: notFound ( $ path , $ options ) ; } return $ response -> getHeaders ( ) ; }
Makes a call to the API and return headers only.

@param string $method  HTTP Method (post, getUserData, put, etc.)
@param string $path    Path to the API call
@param array  $options HTTP Client options

@return array
@throws ResourceNotFoundException
@throws UnauthorizedException
Makes a call to the API and return headers only .