Revise HTTPS Outcalls skill documentation#60
Merged
Conversation
derlerd-dfinity
approved these changes
Mar 3, 2026
Collaborator
derlerd-dfinity
left a comment
There was a problem hiding this comment.
Nice! Thanks a lot!
marc0olo
approved these changes
Mar 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates the HTTP Outcall skill documentation as follows:
Fix Motoko example to compile and run correctly. Replace hand-rolled type definitions with the compiler-provided import IC "ic:aaaaa-aa" types, add the missing is_replicated field, and use Blob directly instead of [Nat8] for the response body.
Fix consensus failures in POST examples. Add a dedicated transformPost function (both Motoko and Rust) that strips the response body in addition to headers, because httpbin.org's /post endpoint returns the caller's IP in the origin field, which differs across replicas. POST functions now return a status message instead of the non-deterministic body.
Use automatic cycle attachment. Replace hardcoded cycle amounts with Call.httpRequest from the ic mops package (Motoko) and document that ic_cdk::management_canister::http_request (Rust) does the same. Both use the ic0.cost_http_request system API under the hood.
Add pitfall for omitting max_response_bytes. New pitfall Improve repo structure, CI pipeline, and contributor experience #5 warns that omitting it defaults to 2MB and charges ~21.5B cycles on a 13-node subnet.
Correct the cycle cost formula. The original formula had request_bytes and response_bytes swapped. Updated with the correct per-byte rates (5,200/request byte, 10,400/max_response_bytes byte on a 13-node subnet), explained that the charge is against max_response_bytes (not actual response size), and documented the ic0.cost_http_request system API for runtime cost calculation.
Update prerequisites to require moc >= 0.14.10 and ic >= 2.1.0 in mops.toml.