设置响应时间限制
parent
ecff344473
commit
f85c83169d
|
@ -21,6 +21,7 @@ const request = (url, options, callback) => {
|
||||||
// data.content_type = 'multipart/form-data'
|
// data.content_type = 'multipart/form-data'
|
||||||
options.json = false
|
options.json = false
|
||||||
}
|
}
|
||||||
|
options.response_timeout = options.timeout
|
||||||
return needle.request(options.method || 'get', url, data, options, (err, resp, body) => {
|
return needle.request(options.method || 'get', url, data, options, (err, resp, body) => {
|
||||||
if (!err) {
|
if (!err) {
|
||||||
body = resp.body = resp.raw.toString()
|
body = resp.body = resp.raw.toString()
|
||||||
|
|
Loading…
Reference in New Issue