Do you know why this is not working on Blazor WebAssembly ?
[Inject]
public HttpClient Http { get; set; }
public string Feeds { get; set; }
protected async override Task OnInitializedAsync()
{
var request = new HttpRequestMessage(HttpMethod.Get, "https://hassanhabib.com/feed/");
request.SetBrowserRequestMode(BrowserRequestMode.NoCors);
using var httpResponse = await Http.SendAsync(request);
Feeds = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
}
the httpResponse.StatusCode
is all time 0.
If you do this on Sever Side it works ... or in .NET Framework app.
Thanks