dolfinApi.http — Outbound HTTP Client #

The dolfin.http client allows custom functions to interact with external third-party systems, REST APIs, and webhook destinations (e.g. Slack, Discord, Zapier, Twilio, external ERPs).


Security & SSRF Protection #

All outbound requests pass through an automated Server-Side Request Forgery (SSRF) validation filter before any network connection is initiated.

Enforced Protections #

  1. Forbidden IP Ranges: Requests resolving to private network blocks (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 127.0.0.0/8, 169.254.0.0/16, ::1, fc00::/7) are blocked immediately.
  2. DNS Resolution Verification: Domain names are resolved to verify destination IP safety before connection dispatch.
  3. Protocol Enforcement: Only standard http: and https: URLs are permitted.

Runtime Constraints #

RuleLimitException Thrown
Max Calls Per Execution5 requestsError: Exceeded maximum HTTP calls per execution (5)
Request Timeout8,000 ms max (8s)DOMException: The operation was aborted
Max Response Payload1 MB (1,048,576 bytes)Error: Response size exceeds the maximum limit

Interface Definition #

typescript
interface HttpOptions {
  headers?: Record<string, string>;
  /** Timeout in milliseconds (capped at 8000ms max) */
  timeoutMs?: number;
}

interface HttpResponse<T = unknown> {
  status: number;
  body: T;
}

Sub-APIs #

MethodSignatureDescription
dolfin.http.get(url, options?)Promise<HttpResponse<T>>Performs an outbound HTTP GET request.
dolfin.http.post(url, body, options?)Promise<HttpResponse<T>>Sends an outbound HTTP POST request with JSON payload.
dolfin.http.put(url, body, options?)Promise<HttpResponse<T>>Sends an outbound HTTP PUT request with JSON payload.
dolfin.http.delete(url, options?)Promise<HttpResponse<T>>Performs an outbound HTTP DELETE request.