设置响应时间限制

pull/166/head
lyswhut 2020-02-15 19:39:50 +08:00
parent ecff344473
commit f85c83169d
1 changed files with 1 additions and 0 deletions

View File

@ -21,6 +21,7 @@ const request = (url, options, callback) => {
// data.content_type = 'multipart/form-data'
options.json = false
}
options.response_timeout = options.timeout
return needle.request(options.method || 'get', url, data, options, (err, resp, body) => {
if (!err) {
body = resp.body = resp.raw.toString()