Cryptic error from icx-proxy

You can implement http_request_streaming_callback method with the correct type. When you want to send the reference, you can trick the compiler to send a different reference type.

let s = actor "your_canister_id" : actor { http_request_streaming_callback : shared () -> async () };
return { callback = s.http_request_streaming_call };

The receiver gets exactly your_canister_id.http_request_streaming_call, so it can make the call properly. The limitation is that you need to hard-code your canister id.

2 Likes