Issue was that I didn't have
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
var builder = WebAssemblyHostBuilder.CreateDefault(args);
// This line
builder.Services.AddScoped(http => new HttpClient
{
BaseAddress = new Uri(builder.HostEnvironment.BaseAddress)
});
await builder.Build().RunAsync();
in my code and only registered an httpclient in the server. This messed something up in the @inject HttpClient Http
that was not visible in the f12 console for some reason.