Skip to content

Commit 8a6d6e9

Browse files
acrobatNyholm
authored andcommitted
Added docs for response headers (#545)
1 parent 48bd26c commit 8a6d6e9

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

doc/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,4 @@ Additional features:
4848
* [Request any Route](request_any_route.md)
4949
* [Customize `php-github-api`](customize.md)
5050
* [Running and writing tests](testing.md)
51+
* [Request / Response info](request_response_info.md)

doc/request_response_info.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## Request / Response information
2+
[Back to the navigation](README.md)
3+
4+
### Get response headers
5+
6+
Get the repsonse header for the latest request
7+
8+
```
9+
$headers = $githubClient->getLastResponse()->getHeaders();
10+
//Example headers
11+
$headers['X-RateLimit-Remaining'];
12+
$headers['X-OAuth-Scopes'];
13+
$headers['X-Accepted-OAuth-Scopes'];
14+
```

0 commit comments

Comments
 (0)