Skip to content

Commit

Permalink
fix(docs): refer to Authorization header in the README, not `Authen…
Browse files Browse the repository at this point in the history
…tication` (#418)

Update README.md

The correct name of the header is 'Authorization' and not 'Authentication'. 

Tested with: 

```
curl -H "Authorization: bearer {edited}" -X POST -d " \
 { \
   \"query\": \"query { viewer { login }}\" \
 } \
" https://api.github.com/graphql
```

Previously:
```
$ curl -H "Authentication: bearer {edited}" -X POST -d " \
 { \
   \"query\": \"query { viewer { login }}\" \
 } \
" https://api.github.com/graphql
{
  "message": "This endpoint requires you to be authenticated.",
  "documentation_url": "https://docs.github.com/graphql/guides/forming-calls-with-graphql#authenticating-with-graphql"
}
```
  • Loading branch information
ptabor committed Oct 19, 2022
1 parent 602d702 commit f4e8019
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ const { withCustomRequest } = require("@octokit/graphql");
let requestCounter = 0;
const myRequest = request.defaults({
headers: {
authentication: "token secret123",
authorization: "bearer secret123",
},
request: {
hook(request, options) {
Expand Down

0 comments on commit f4e8019

Please sign in to comment.