Skip to main content

cost_http_request_v2

Function cost_http_request_v2 

Source
pub fn cost_http_request_v2(params: &[u8]) -> u128
Expand description

Gets the cycle cost of a canister HTTPS outcall priced with pricing version 2.

This prices both http_request with pricing_version set to 2 and flexible_http_request, which is always priced this way.

params must be the Candid encoding of the parameter record documented for ic0.cost_http_request_v2. This function traps if it is not.

Prefer the typed wrappers in the ic-cdk-management-canister crate, which build and encode the record for you.