Skip to content

Commit 6c27bd4

Browse files
committed
Add HEAD to allowed cacheable request types -- Thanks GrahamCampbell!
1 parent 3e66a16 commit 6c27bd4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Github/HttpClient/CachedHttpClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function request($path, $body = null, $httpMethod = 'GET', array $headers
6868
return $cacheResponse;
6969
}
7070

71-
if ($httpMethod == 'GET') {
71+
if (in_array($httpMethod, array('GET', 'HEAD'), true)) {
7272
$this->getCache()->set($this->id, $response);
7373
}
7474

0 commit comments

Comments
 (0)