extension-http-outcalls
HTTP outcalls performed by the backend canister (not in the frontend).
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
HTTP outcalls performed by the backend canister (not in the frontend).
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
| name | extension-http-outcalls |
| description | HTTP outcalls performed by the backend canister (not in the frontend). |
| version | 0.1.6 |
| compatibility | {"mops":{"caffeineai-http-outcalls":"~0.1.2"}} |
| caffeineai-subscription | ["none"] |
HTTP outcalls extension for Caffeine AI.
This skill adds the ability to make HTTP GET and POST requests from the backend canister. Useful for integrating with external APIs and services.
For HTTP outcalls that must be performed in the backend:
There is the prefabricated module mo:caffeineai-http-outcalls/outcall.mo that that cannot be modified. It provides fundamental functionality for making HTTP GET or PUT requests in the backend.
module {
public type TransformationInput = {
context : Blob;
response : IC.HttpRequestResult;
};
public type TransformationOutput = IC.HttpRequestResult;
public type Transform = query TransformationInput -> async TransformationOutput;
public type Header = {
name: Text;
value: Text;
};
// Helper function for the transform callback used by the IC on HTTP outcalls.
public func transform(input : TransformationInput) : TransformationOutput;
// HTTP GET request with a transform callback function.
public func httpGetRequest(url : Text, extraHeaders: [Header], transform : Transform) : async Text;
// HTTP POST request, specifying a transform callback.
public func httpPostRequest(url : Text, extraHeaders: [Header], body : Text, transform : Transform) : async Text;
};
Usage for GET:
import OutCall "mo:caffeineai-http-outcalls/outcall";
actor {
public query func transform(input: OutCall.TransformationInput) : async OutCall.TransformationOutput {
OutCall.transform(input);
};
func makeGetOutcall(url: Text) : async Text {
await OutCall.httpGetRequest(url, [], transform);
};
};
Hint: JSON parsing is not directly supported in Motoko. Better tunnel JSON to frontend for parsing.
POST usage is analogous.
MANDATORY recipe for every Caffeine build that lists upcoming events or creates events on the user's own Google Calendar. The ONLY supported path is the `googlecalendar-client` mops package (Calendar REST API v3) combined with the `google-oauth` mops package (token exchange + refresh + PKCE). Hand-rolling `ic.http_request` calls to `oauth2.googleapis.com` or `www.googleapis.com/calendar/v3` is a FORBIDDEN anti-pattern — it bypasses bearer auth, replication-cost safeguards, and the `google-oauth` library's percent-encoding and JSON parsing. Load this skill whenever the user, spec, or any prior task mentions scheduling, calendar events, appointments, meetings, "add to calendar", or any equivalent phrasing — and BEFORE writing any code that touches a Google endpoint.
MANDATORY recipe for every Caffeine build that sends email through the user's own Gmail account. The ONLY supported path is the `googlemail-client` mops package (Gmail REST API) combined with the `google-oauth` mops package (token exchange + refresh + PKCE). Hand-rolling `ic.http_request` calls to `oauth2.googleapis.com` or `gmail.googleapis.com` is a FORBIDDEN anti-pattern — it bypasses bearer auth, replication-cost safeguards, and the `google-oauth` library's percent-encoding and JSON parsing. Load this skill whenever the user, spec, or any prior task mentions sending email, Gmail, "notify via email", "forward results by email", or any equivalent phrasing — and BEFORE writing any code that touches a Google endpoint.
Quick reference for the Caffeine Data Intelligence agent to query an OQL-exposing canister (schema() + execute()) through the `icp` CLI against the project's `backend` canister: read the schema, form JSON queries (filter / order / paginate / aggregate / dotted-path edges), and parse the Candid result rows.
Make a canister's data queryable by the Caffeine Data Intelligence agent. Use whenever an app stores structured data (Maps/Lists/arrays of records) that should be answerable in natural language — "top customers", "revenue by region", "active projects". Adds a discoverable `schema()` and a JSON `execute()` query endpoint via the `caffeineai-oql` mops package's `Expose` mixin.
Core infrastructure providing backend connection configuration, storage client, and React app entry point.
General file/object storage, such as for images, videos, files, documents and other bulk data. Perfect fit for image galleries, video galleries, and other file or object management. Supports large files beyond IC limit, with browser-cached HTTP URL access.