An HTTP client sends requests to network resources and receives responses. In .NET MAUI, HttpClient can retrieve JSON from REST APIs and deserialize it into C# objects for display. section 6.2.1 section 8.3
A typical MAUI data-loading flow is:
- Store the API key, base URI, response models, collections, and HttpClient field. section 6.2.1
- Create HttpClient with a base address, then assign the page as the binding context. section 6.2.1
- Load genres and trending movies asynchronously when the page appears, using GetFromJsonAsync<T>. section 6.2.1
- Bind the resulting collections to the UI and expose loading state while requests complete. section 6.2.1
REST APIs expose resources through HTTP verbs such as GET, POST, PUT, PATCH, and DELETE, with JSON commonly used for request and response payloads. Direct HttpClient calls work well for small applications; larger solutions may use autogenerated clients. section 8.3
Loading a REST resource
With an HttpClient whose base address is configured, an application can retrieve and deserialize a product in one asynchronous call: var product = await _httpClient.GetFromJsonAsync<Product>("product"); section 8.3
var product = await _httpClient.GetFromJsonAsync<Product>("product");
Inspect the compact GetFromJsonAsync example for a direct HttpClient-to-model request. section 8.3



