The HttpClient base address reflects the base path of the app, which is great, but it's missing the trailing slash:
@inject HttpClient Http
@functions {
protected override async Task OnInitAsync()
{
Console.WriteLine(Http.BaseAddress); // Expected: <base-uri>/foo/, Actual: <base-uri>/foo
}
}
The problem seems to be here:
https://github.com/aspnet/Blazor/blob/a9c45fe78ac18b6bd524904b40896c249f9f09c0/src/Microsoft.AspNetCore.Blazor.Browser/Services/BrowserUriHelper.cs#L146-L158
The
HttpClientbase address reflects the base path of the app, which is great, but it's missing the trailing slash:The problem seems to be here:
https://github.com/aspnet/Blazor/blob/a9c45fe78ac18b6bd524904b40896c249f9f09c0/src/Microsoft.AspNetCore.Blazor.Browser/Services/BrowserUriHelper.cs#L146-L158