mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2025-10-23 07:33:10 +00:00
fix(requests): omit JSON based(without encryption) data
This commit is contained in:
parent
97bd7fedf8
commit
e0eec75f08
5505
package-lock.json
generated
5505
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -172,7 +172,13 @@ const createRequest = (method, url, data, options) => {
|
||||
}
|
||||
} catch (e) {
|
||||
// console.log(e)
|
||||
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
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user