mbot/node_modules/undici/lib/interceptor/retry.js

20 lines
419 B
JavaScript
Raw Normal View History

2024-05-11 05:39:11 +00:00
'use strict'
const RetryHandler = require('../handler/retry-handler')
module.exports = globalOpts => {
return dispatch => {
return function retryInterceptor (opts, handler) {
return dispatch(
opts,
new RetryHandler(
{ ...opts, retryOptions: { ...globalOpts, ...opts.retryOptions } },
{
handler,
dispatch
}
)
)
}
}
}