IHttpContentSerializer make ToHttpContent async #2010
KurinnyiVadym
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
It would be useful if the ToHttpContent method could be asynchronous.
In my case, the request body type T needs to be available before I can perform an asynchronous encryption step. I initially considered using a DelegatingHandler, but at that stage, the request body has already been serialised into raw JSON, and the original type T is no longer accessible.
Having an async ToHttpContent would make it possible to work with the typed request model before it’s serialised, enabling scenarios like encryption or other async preprocessing steps.
Beta Was this translation helpful? Give feedback.
All reactions