Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

In the new Blazor Web App template using .net 8, how do I make an HTTP request from a InteractiveWebAssembly mode component?

$
0
0

I need to get some informatino from a web API. On .net 7 I just injected HttpClient to the Blazor component but now it says:

There is no registered service of type 'System.Net.Http.HttpClient'.

In some videos I saw they talked about making the request using a CascadingParameter but I have not being able to find a working example using that approach.

I also tried defining it as an CascadingParameter. As a cascading parameter it is just null.

Thanks for the help


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>