新增DNS缓存功能

This commit is contained in:
lyswhut
2019-09-23 13:24:32 +08:00
parent f7267806df
commit f63f645696
10 changed files with 51 additions and 15 deletions
+1
View File
@@ -19,6 +19,7 @@ const api_test = {
method: 'get',
timeout,
headers,
family: 4,
})
requestObj.promise = requestObj.promise.then(({ body }) => {
return body.code === 0 ? Promise.resolve({ type, url: body.data }) : Promise.reject(new Error(requestMsg.fail))