pub async fn http_request_with_closure(
arg: CanisterHttpRequestArgument,
cycles: u128,
transform_func: impl FnOnce(HttpResponse) -> HttpResponse + 'static,
) -> CallResult<(HttpResponse,)>
Available on crate feature
transform-closure
only.Expand description
Make an HTTP request to a given URL and return the HTTP response, after a transformation.
Do not set the transform
field of arg
. To use a Candid function, call http_request
instead.
This call requires cycles payment. The required cycles is a function of the request size and max_response_bytes. Check Gas and cycles cost for more details.