Uh oh!
There was an error while loading. Please reload this page.
Add an http outcalls example - #1261
Conversation
| body: None, | ||
| // No need to transform the response any longer, as it is not replicated | ||
| transform: None, | ||
| // The request is not replicated. This means that a single node will attempt the outcall. This is ideal for fast moving data (such as eg crypto prices), non idempotent operations and so on. |
There was a problem hiding this comment.
I think we should mention here that one must be cautious with trusting such a response, as a malicious replica could return whatever it wanted. And maybe also that for practical purposes this usually means that one needs a way to verify the response out of band inside the canister, or to send out multiple such requests and only accept if enough responses agree.
There was a problem hiding this comment.
Similarly, I'd also mention something along those lines in the readme.md.
There was a problem hiding this comment.
Good points, I added some more comments both in the code and in the readme doc
fxgst
commented
Sep 1, 2025
Is this supposed to replace the HTTP Get and HTTP Post examples? They seem quite overlapping |
letmejustputthishere
commented
Sep 2, 2025
i think there are some CI workflows missing https://github.com/dfinity/examples/blob/master/NINJA_CONTRIBUTING.md#preparing-the-pr |
This showcases two ways of using the http outcalls feature in rust, and adds them to the icp ninja examples:
In the case of the replicated http outcall, we also showcase the use of transform queries and how / why they help reach consensus.