Software-Engineering
API_REST
SE_Dependency-Injection
Blazor_StateManagement
# HttpClient
We gonna use the HttpClient class in combination with some methods to call REST-Endpoints.
Make sure to inject the HttpClient from the DI container.
# GET
# GetFromJsonAsync<…>()
Let’s say we want to load subjects from a REST-Api. We save them temporarely in a list.
# DELETE
# .DeleteAsync()
Let’s say we want to delete any subject (specific id) using a REST-Api.
# POST
# .PostAsJsonAsync()
Let’s say we want to add another subject using a REST-Api.
# PUT
# .PutAsJsonAsync()
Let’s say we want to update a single subject (specific id) using our REST-Api.