net

Resilient networking and fetch utilities.

Functions

Function
Description
Example

smartFetch

Fetch with automatic retry

dphelper.net.smartFetch(url, options)

Description

Network communication utilities:

  • Smart Fetch - Automatic retry with exponential backoff

  • Resilience - Handle transient network errors

  • Retry Strategy - Configurable retry attempts and delays

Usage Examples

Smart Fetch with Retry

// Basic smart fetch
const response = await dphelper.net.smartFetch('/api/data');
const data = await response.json();

// Fetch with options
const result = await dphelper.net.smartFetch('https://api.example.com', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ key: 'value' })
});

API Error Handling

Details

  • Author: Dario Passariello & Jo

  • Version: 0.0.1

  • Creation Date: 20260220

  • Last Modified: 20260220

  • Environment: both (browser + Node.js)


Automatically generated document

Last updated