.do
Integration

requests

HTTP/API request management

requests

HTTP/API request management with automatic retries, caching, rate limiting, and request/response transformation.

Overview

The requests primitive provides a high-level interface for making HTTP requests with built-in best practices for reliability, performance, and error handling.

Quick Example

import { requests } from 'sdk.do'

// Simple GET request
const data = await requests.get('https://api.example.com/users')

// POST with retry logic
const user = await requests.post('https://api.example.com/users', {
  body: { name: 'Alice', email: '[email protected]' },
  retries: 3,
  timeout: 5000,
})

// With caching
const products = await requests.get('https://api.example.com/products', {
  cache: '5m', // Cache for 5 minutes
})

Core Capabilities

  • Automatic Retries - Exponential backoff for failed requests
  • Request Caching - In-memory and persistent caching
  • Rate Limiting - Prevent overwhelming external APIs
  • Timeout Management - Configurable request timeouts
  • Transform Pipeline - Pre/post request transformations

Access Methods

SDK

TypeScript/JavaScript library for HTTP requests

await requests.get('https://api.example.com/users')

SDK Documentation

CLI

Command-line tool for HTTP requests

CLI Documentation

API

REST/RPC endpoints for proxied requests

API Documentation

MCP

Model Context Protocol for AI-driven HTTP requests

Make a GET request to https://api.example.com/users

MCP Documentation