From 31e1d2b4494bfef2d4528d8d8449b25b8b665074 Mon Sep 17 00:00:00 2001 From: Jeroen Thora Date: Sat, 25 Mar 2017 17:20:08 +0100 Subject: [PATCH] Added docs for response headers --- doc/README.md | 1 + doc/request_response_info.md | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 doc/request_response_info.md 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']; +```