KnpLabs/php-github-api — pull request #166 by aztech-dev (2014-07-31 13:07:03+00:00)
Title: Add ability to check that a file exists in repo branch/commit

Current Contents API requires to download the file (even with the "show" method, file content is returned up to 1Mb in size) just to check if it exists remotely.

Proposed changes adds a head(...) helper method to AbstractApi and leverages it to make a HEAD call to the "Get contents" endpoint of the API instead of a GET to avoid downloading file content.