There’s a reason that we don’t write programs in one giant file. It’s impossible to find things. Separating code into “stuff that deals with presentation” and “stuff that deals with business objects” makes for a much more readable code base.
I would go so far as to say that you should never inject HttpClient into anything but a service.
So what I do here is to work backwards. Decide what shape a service would have in order to provide a page with exactly what it wants. In your situation, it seems that would be “I want to exchange an integer ID (I would also recommend making the ID a string instead of a number, because it eliminates one more set of things to worry about (what if I get something that isn’t a number?)) for a School”.