mirror of
https://gitlab.com/Binaryify/neteasecloudmusicapi.git
synced 2025-05-23 22:37:41 +08: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) {
|
} catch (e) {
|
||||||
// console.log(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.body = body
|
||||||
|
}
|
||||||
answer.status = res.status
|
answer.status = res.status
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user