0.0.3 • Published 2 years ago
@yafetch/plugin-retry v0.0.3
@yafetch/plugin-retry
About
This plugin is part of yafetch
Usage
const yafetch = require('@yafetch/core')
const pluginRetry = require('@yafetch/plugin-retry')
// or
import yafetch, { GlobalOptions } from '@yafetch/core'
import pluginRetry from '@yafetch/plugin-retry'
// then, add plugin in global options
GlobalOptions.yafetch = {
// ... other options, if any
plugins: {
wrap: [
pluginRetry({
delay: 2
})
]
}
}
// or in a per-request options
const res = await yafetch('< string url or Request object >', {
// ... other options, if any
plugins: {
wrap: [
pluginRetry({
delay: 2
})
]
}
// ... other options, if any
})
See plugin-retry documentation for more information.
Previous work
This plugin was inspired by vercel/fetch-retry.
0.0.3
2 years ago
0.0.3-beta.0
2 years ago
0.0.2
2 years ago
0.0.2-beta.0
2 years ago
0.0.1
2 years ago
0.0.1-beta.0
2 years ago