From 1df21ab59b96219dc3152e8ced21b42efe15c7b3 Mon Sep 17 00:00:00 2001 From: BrightSphere <36415900+BrightSphere@users.noreply.github.com> Date: Tue, 16 Jul 2019 21:47:18 +0800 Subject: [PATCH] fix: pixiv refresh token error (#2631) Ref: DIYgod#2608 --- lib/routes/pixiv/token.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/routes/pixiv/token.js b/lib/routes/pixiv/token.js index ac3653e45a..040b9a6aa5 100644 --- a/lib/routes/pixiv/token.js +++ b/lib/routes/pixiv/token.js @@ -57,7 +57,10 @@ async function refreshToken(refresh_token) { data.append(key, element); } } - const response = await got.post('https://oauth.secure.pixiv.net/auth/token', data, { + const response = await got({ + method: 'post', + url: 'https://oauth.secure.pixiv.net/auth/token', + data: data, headers: { ...maskHeader, ...data.getHeaders(),