Skip to content

Added docs for getting the response headers #545

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 26, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
14 changes: 14 additions & 0 deletions doc/request_response_info.md
Original file line number Diff line number Diff line change
@@ -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'];
```