-
-
Notifications
You must be signed in to change notification settings - Fork 388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.net 8 blazor wasm PlatformNotSupportedException #823
Comments
What version of Flurl.Http? |
4.0.2 |
Looking into this a little more, it is a handled exception, but Rider is still breaking when this exception is thrown. Would it be possible to check for WASM before setting the UseCookies property on HttpClientHandler? |
That try/catch is meant to be sort of a future-proof catch-all so Flurl doesn't need to sniff for specific platforms. I'll make a note to look at it, there's some sniffing going on in other areas so this isn't a hard rule. Can you exclude PlatformNotSupportedException from exceptions that Rider breaks on? You can in VS but I'm less familiar with Rider. |
And along the lines of future-proofing, if some future version of WASM adds support for UseCookies, this could cause problems. So it's kind of doubtful I'll make a change here, but I will still take a look at it. |
Probably. For now, at least in development, I have forked the repo and added... |
maybe add configuration option to toggle whether or not to use cookies? |
Using the code from the docs on a Blazor WASM application:
`services.AddSingleton(sp => new FlurlClientCache()
.Add("MyCli", "https://some-api.com"));
public MyService(IFlurlClientCache clients) {
_flurlCli = clients.Get("MyCli");`
causes a PlatformNotSupportedException. Looking at the stack trace, it looks like it is related to UseCookies.
The text was updated successfully, but these errors were encountered: