mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2026-10-20 22:51:23 +08:00
fix(requests): omit JSON based(without encryption) data
This commit is contained in:
Generated
+5499
-6
File diff suppressed because it is too large
Load Diff
+7
-1
@@ -172,7 +172,13 @@ const createRequest = (method, url, data, options) => {
|
||||
}
|
||||
} catch (e) {
|
||||
// console.log(e)
|
||||
answer.body = body
|
||||
try {
|
||||
answer.body = JSON.parse(body.toString())
|
||||
} catch (err) {
|
||||
// console.log(err)
|
||||
// can't decrypt and can't parse directly
|
||||
answer.body = body
|
||||
}
|
||||
answer.status = res.status
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user