Factory function that creates a retry plugin for FetchEngine.
The plugin installs an execute (pipe) hook at priority -20 that wraps the core request function in a retry loop with exponential backoff.
execute
-20
Optional
Default retry configuration for the engine
FetchPlugin that can be installed via engine.use() or plugins config
engine.use()
plugins
const api = new FetchEngine({ baseUrl: 'https://api.example.com', plugins: [ retryPlugin({ maxAttempts: 3, baseDelay: 1000 }) ] }); Copy
const api = new FetchEngine({ baseUrl: 'https://api.example.com', plugins: [ retryPlugin({ maxAttempts: 3, baseDelay: 1000 }) ] });
Factory function that creates a retry plugin for FetchEngine.
The plugin installs an
execute(pipe) hook at priority-20that wraps the core request function in a retry loop with exponential backoff.