pub struct FetchRequest {
pub method: String,
pub url: String,
pub headers: Vec<(String, String)>,
pub body: Vec<u8>,
pub price_max: Option<u64>,
}Expand description
An outbound HTTP request as the guest describes it. Circlet validates the
host, substitutes secrets, and hands the finished request to the
embedder’s Host.
{{secret.NAME}} placeholders resolve in url and headers only —
never in body, which is opaque bytes. That line is deliberate: it keeps
substitution deterministic and keeps binary bodies binary.
Fields§
§method: StringHTTP method, verbatim.
url: StringFull URL; the hostname must be in the grant’s allowlist.
headers: Vec<(String, String)>Header pairs, verbatim after secret substitution.
body: Vec<u8>Request body, passed through untouched.
price_max: Option<u64>The author’s declared price for THIS call, in pixie — the
developer-priced bill line, the author’s own margin on a call their
action performs. Reserved from the grant BEFORE the call performs,
gas-style, so estimation never breaks; the guest may price it lower
afterwards (Price), and a call never priced stands at its max.
None means the call carries no developer price.