mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2026-10-23 08:01:23 +08:00
perf: 改进api调试页面
This commit is contained in:
@@ -12,6 +12,8 @@ const createOption = (query, crypto = '') => {
|
||||
e_r: query.e_r || undefined,
|
||||
domain: query.domain || '',
|
||||
checkToken: query.checkToken || false,
|
||||
headers: query.headers || {},
|
||||
timeout: query.timeout || 0,
|
||||
}
|
||||
}
|
||||
module.exports = createOption
|
||||
|
||||
@@ -344,6 +344,11 @@ const createRequest = (uri, data, options) => {
|
||||
httpsAgent: createHttpsAgent(),
|
||||
}
|
||||
|
||||
// 自定义超时
|
||||
if (options.timeout > 0) {
|
||||
settings.timeout = options.timeout
|
||||
}
|
||||
|
||||
// 使用返回值加密
|
||||
const use_e_r = (crypto === 'eapi' || crypto === 'weapi') && data.e_r
|
||||
const use_xeapi = crypto === 'xeapi'
|
||||
|
||||
Reference in New Issue
Block a user