So in our initial page we had
@inject HttpClient Httpat the top of the page and all was fine. We are now moving our code blocks into code behind to seperate the code from the page. If I remove the above line from the page and then in the code behind do:
[Inject] public required HttpClient Http { get; set; }all still works fine. However, we would prefer to have it in the constructor:
private HttpClient Http;public myclass (HttpClient http){ Http = http;}where and how should I reference HttpClient so that I can use it in the above way?