Surge_by_SukkaW/Build/lib/fetch-retry.js
2023-10-18 15:19:15 +08:00

12 lines
328 B
JavaScript

// @ts-check
const undici = require('undici');
// Enable HTTP/2 supports
// undici.setGlobalDispatcher(new undici.Agent({
// allowH2: true,
// pipelining: 10
// }));
const fetchWithRetry = /** @type {import('undici').fetch} */(require('@vercel/fetch-retry')(undici.fetch));
module.exports.fetchWithRetry = fetchWithRetry;