Blazor HTTP Client examples

Post JSON

await httpClient.PostAsJsonAsync(url, data);

Post and JSON and read from JSON response

var response = await httpClient.PostAsJsonAsync(url, data);
var entity = await response.Content.ReadFromJsonAsync<TEntity>();
Last updated: 9/7/2022 12:43:08 PM

Latest Updates

© 0 - 2025 - Mike Brind.
All rights reserved.
Contact me at Mike dot Brind at Outlook.com