
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-codeInstalls 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