Skip to content

Commit de47d23

Browse files
committed
improvement: accept json response
1 parent 9d17bfc commit de47d23

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

api/token.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ export default async (req, res) => {
44
const r = await fetch("https://github.com/login/oauth/access_token", {
55
method: "POST",
66
headers: {
7-
"Content-Type": "application/json"
7+
"Content-Type": "application/json",
8+
accept: "application/json" // Return JSON
89
},
910
body: JSON.stringify({
1011
...req.body,

0 commit comments

Comments
 (0)