You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a scenario where my Blazor wasm client maybe communicating with multiple api's using different security infrastructure. E.g. some bearer tokens, some cookie based, etc. Currently it looks like the HttpClient just sends all cookies for every request and gives no control over the sending cookies or the cookie container. For example
var handler = new HttpClientHandler { UseCookies = false };
throws an Platform Not supported exception when it is passed to the constructor of the HttpClient. The same is true for setting the cookie container. This means that you cannot override the cookies in the HttpRequestMessage.
What I would really like to do is configure the cookie container on the HttpClient via DI. Is this possible or will it be possible in the future?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a scenario where my Blazor wasm client maybe communicating with multiple api's using different security infrastructure. E.g. some bearer tokens, some cookie based, etc. Currently it looks like the HttpClient just sends all cookies for every request and gives no control over the sending cookies or the cookie container. For example
var handler = new HttpClientHandler { UseCookies = false };
throws an Platform Not supported exception when it is passed to the constructor of the HttpClient. The same is true for setting the cookie container. This means that you cannot override the cookies in the HttpRequestMessage.
What I would really like to do is configure the cookie container on the HttpClient via DI. Is this possible or will it be possible in the future?
Beta Was this translation helpful? Give feedback.
All reactions