Class Github\HttpClient\CachedHttpClient

InheritanceGithub\HttpClient\CachedHttpClient » Github\HttpClient\HttpClient
ImplementsGithub\HttpClient\HttpClientInterface

Performs requests on GitHub API using If-Modified-Since headers.

Returns a cached version if not modified Avoids increasing the X-Rate-Limit, which is cool.

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
createRequest() Create requests with If-Modified-Since headers. Github\HttpClient\CachedHttpClient

Property Details

$cache protected property

Method Details

createRequest() protected method

Create requests with If-Modified-Since headers.

{@inheritdoc}

protected void createRequest ( $httpMethod, $path, $body null, array $headers = [], array $options = [] )
$httpMethod
$path
$body
$headers
$options
getCache() public method

public Github\HttpClient\Cache\CacheInterface getCache ( )
getLastResponse() public method

public \Github\HttpClient\Guzzle\Http\Message\Response getLastResponse ( $force false )
$force
request() public method

{@inheritdoc}

public void request ( $path, $body null, $httpMethod 'GET', array $headers = [], array $options = [] )
$path
$body
$httpMethod
$headers
$options
setCache() public method

public void setCache ( Github\HttpClient\Cache\CacheInterface $cache )
$cache

CacheInterface