You can read static or local files by creating HttpClient Get calls. The GetStringAsync method sends a request to the specific URI and returns the response body as a string in an async operation.
@inject HttpClient Http
@code {
protected override async Task OnInitializedAsync()
{
var content = await Http.GetStringAsync(request Uri);
}
}
Please refer to “HttpClient Class” for more details.
Share with