fix(core): update
This commit is contained in:
parent
fe50adb1ff
commit
8e7c730d86
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@pushrocks/smartrequest',
|
||||
version: '2.0.13',
|
||||
version: '2.0.14',
|
||||
description: 'dropin replacement for request'
|
||||
}
|
||||
|
@ -209,10 +209,11 @@ export let request = async (
|
||||
};
|
||||
|
||||
export const safeGet = async (urlArg: string) => {
|
||||
const agentToUse = urlArg.startsWith('http') ? plugins.http.globalAgent : plugins.https.globalAgent;
|
||||
try {
|
||||
const response = await request(urlArg, {
|
||||
method: 'GET',
|
||||
agent: plugins.http.globalAgent,
|
||||
agent: agentToUse,
|
||||
timeout: 5000,
|
||||
autoJsonParse: false,
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user