dfinity avatar

Https Outcalls

When your canister needs to talk to an external API, this shows you how to make HTTPS requests that actually reach consensus across replicas. The tricky part is that every node runs the same code, so you need a transform function to strip out non-deterministic fields like timestamps and header ordering before responses are compared. The examples cover cycle cost management (outcalls aren't free), the 2MB response limit, and why you should never skip max_response_bytes unless you want to burn 21 billion cycles per call. Also walks through idempotency patterns for POST requests, since a 13-node subnet means your "create order" endpoint gets hit 13 times. Both Motoko and Rust examples use helper functions that auto-compute cycle costs.

skills.sh installs
317
GitHub stars
39
last updated
Aug 21, 2026

Install

$ npx -y skills add dfinity/icskills --skill https-outcalls --agent claude-code

Installs into .claude/skills of the current project.

Files

HTTPS Outcalls

What This Is

HTTPS outcalls allow canisters to make HTTP requests to external web services directly from on-chain code. In the default replicated mode, every node on the subnet makes the same request and all of them must agree on the response. A transform function strips non-deterministic fields (timestamps, request IDs, ordering) so that every replica sees an identical response and can reach consensus.

Two other modes avoid that agreement step: non-replicated (is_replicated = false, one node makes the request) and flexible (flexible_http_request, a committee of nodes return their individual responses). See Outcall modes.

Support matrix

Sponsors

Details

Repository
github.com/dfinity/icskills
Categories
Backend & APIs, Finance & Trading, Web3 & Blockchain
First seen
Jun 3, 2026

More from dfinity/icskills

All 16
1silvainfm avatarduckdbsilvainfm/claude-skillsFast in-process analytical database for SQL queries on DataFrames, CSV, Parquet, JSON files, and more. Use when user wants to perform SQL analytics on data file317skills.sh installs
2incept5 avatareve-new-project-setupincept5/eve-skillpacksConfigure a new Eve Horizon project after running eve init (profile, auth, manifest, and repo linkage).316skills.sh installs
3jezweb avatarvercel-kvjezweb/claude-skillsIntegrate Redis-compatible Vercel KV for caching, session management, and rate limiting in Next.js. Powered by Upstash with strong consistency and TTL support. 314skills.sh installs
4jezweb avatarmcp-cli-scriptsjezweb/claude-skillsBuild CLI scripts alongside MCP servers for terminal environments. File I/O, batch processing, caching, richer output formats. Templates for TypeScript scripts 313skills.sh installs
5incept5 avatareve-read-eve-docsincept5/eve-skillpacksLoad first. State-today index of distilled Eve Horizon system docs with task-based routing for CLI/API usage, manifests, pipelines, jobs, secrets, agents, build305skills.sh installs
6jezweb avatartinacmsjezweb/claude-skillsBuild content-heavy sites with Git-backed TinaCMS. Provides visual editing for blogs, documentation, and marketing sites. Supports Next.js, Vite+React, and Astr304skills.sh installs