优化网络请求,尝试去解决无法连接服务器的问题
This commit is contained in:
@@ -21,6 +21,7 @@ const request = (url, options, callback) => {
|
||||
options.json = false
|
||||
}
|
||||
options.response_timeout = options.timeout
|
||||
console.log(options)
|
||||
return needle.request(options.method || 'get', url, data, options, (err, resp, body) => {
|
||||
if (!err) {
|
||||
body = resp.body = resp.raw.toString()
|
||||
|
||||
Reference in New Issue
Block a user