添加超时

pull/1761/head
lyswhut 2023-12-03 15:06:04 +08:00
parent 323743e426
commit 4f5baa1ac8
1 changed files with 1 additions and 1 deletions

View File

@ -161,7 +161,7 @@ const initEnv = (userApi) => {
// data.content_type = 'multipart/form-data'
options.json = false
}
options.response_timeout = timeout
options.response_timeout = typeof timeout == 'number' && timeout > 0 ? Math.min(timeout, 60_000) : 60_000
let request = needle.request(method, url, data, options, (err, resp, body) => {
// console.log(err, resp, body)