The existing HTTP outcall transfrom API uses std::any::type_name in the specific way that it says not to, and which is not guaranteed to keep working. This PR changes it to a different system where a closure is used based on the context, rather than requiring the context to be interpreted directly. An optional feature is used for the new API as it requires exporting a canister method. Manual testing was performed to ensure there were no memory leaks.
The existing HTTP outcall transfrom API uses
std::any::type_name
in the specific way that it says not to, and which is not guaranteed to keep working. This PR changes it to a different system where a closure is used based on the context, rather than requiring the context to be interpreted directly. An optional feature is used for the new API as it requires exporting a canister method. Manual testing was performed to ensure there were no memory leaks.Is there a better name for these functions?