fix lint
This commit is contained in:
@ -12,9 +12,9 @@ export async function getJson(url: string, accept = 'application/json, */*', tim
|
||||
method: 'GET',
|
||||
headers: Object.assign({
|
||||
'User-Agent': config.userAgent,
|
||||
Accept: accept
|
||||
Accept: accept,
|
||||
}, headers || {}),
|
||||
timeout
|
||||
timeout,
|
||||
});
|
||||
|
||||
return await res.json();
|
||||
@ -26,9 +26,9 @@ export async function getHtml(url: string, accept = 'text/html, */*', timeout =
|
||||
method: 'GET',
|
||||
headers: Object.assign({
|
||||
'User-Agent': config.userAgent,
|
||||
Accept: accept
|
||||
Accept: accept,
|
||||
}, headers || {}),
|
||||
timeout
|
||||
timeout,
|
||||
});
|
||||
|
||||
return await res.text();
|
||||
@ -95,7 +95,7 @@ export const httpAgent = config.proxy
|
||||
maxSockets,
|
||||
maxFreeSockets: 256,
|
||||
scheduling: 'lifo',
|
||||
proxy: config.proxy
|
||||
proxy: config.proxy,
|
||||
})
|
||||
: _http;
|
||||
|
||||
@ -109,7 +109,7 @@ export const httpsAgent = config.proxy
|
||||
maxSockets,
|
||||
maxFreeSockets: 256,
|
||||
scheduling: 'lifo',
|
||||
proxy: config.proxy
|
||||
proxy: config.proxy,
|
||||
})
|
||||
: _https;
|
||||
|
||||
|
Reference in New Issue
Block a user