diff --git a/doc/README.md b/doc/README.md index ba33a60c503..ea20c6a6897 100644 --- a/doc/README.md +++ b/doc/README.md @@ -48,3 +48,4 @@ Additional features: * [Request any Route](request_any_route.md) * [Customize `php-github-api`](customize.md) * [Running and writing tests](testing.md) +* [Request / Response info](request_response_info.md) diff --git a/doc/request_response_info.md b/doc/request_response_info.md new file mode 100644 index 00000000000..880e7f85a22 --- /dev/null +++ b/doc/request_response_info.md @@ -0,0 +1,14 @@ +## Request / Response information +[Back to the navigation](README.md) + +### Get response headers + +Get the repsonse header for the latest request + +``` +$headers = $githubClient->getLastResponse()->getHeaders(); +//Example headers +$headers['X-RateLimit-Remaining']; +$headers['X-OAuth-Scopes']; +$headers['X-Accepted-OAuth-Scopes']; +```