Skip to content

Commit

Permalink
Add Accept header for github revoke token (#13)
Browse files Browse the repository at this point in the history
following the best practice from github that says that need to pass this
header

Signed-off-by: Carlos Tadeu Panato Junior <ctadeu@gmail.com>
  • Loading branch information
cpanato committed Mar 9, 2024
1 parent 6177b44 commit 980538b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion post.js
Expand Up @@ -9,7 +9,10 @@ if (!tok) {
try {
const res = await fetch('https://api.github.com/installation/token', {
method: 'DELETE',
headers: { 'Authorization': `Bearer ${tok}` },
headers: {
'Authorization': `Bearer ${tok}`,
'Accept': 'application/vnd.github+json',
},
});

if (res.status == 204) {
Expand Down

0 comments on commit 980538b

Please sign in to comment.