Wondering if there’s any reason that ic_cdk doesn’t support content-encoding out of the box?
I did a little tracking through
ic_agent and realize that the only header being set on requests that use the
Reqwest transport is the
I assume maybe it was to much work to get this working between the agent, some proxy engine (nginx?) and the CDK used for the WASM binaries.
It would be nice to be able to specify (we were thinking of doing so at the macro level) that we want some
content-encoding (the same we specify a guard function in the canister
#[query(content_encoding="gzip")]), that would allow the client side to know that the payload had been encoded by setting the
content-encoding header. I assume that some intermediary / proxy takes the canister function responses and wraps them as HTTP responses for the Agent to consume (just curious for my own mental model on how this actually works).
Also curious if there is some obvious pitfall I’m over looking as to why this isn’t in play already?
Thanks for the help =]