Skip to main content

HttpContentExtensions

A static class in Alta.Api.DataTransferModels, Alta.Api.DataTransferModels.Extensions.

Reads HTTP response content as JSON.

Fields​

1 private and internal field
MemberWhat it is
private static readonly Logger LoggerClass logger.

Methods​

MemberWhat it is
static async Task<T> ReadAsJsonAsync<T>(HttpContent content)Reads the content and deserialises it to T on a worker thread. Logs the raw text and rethrows if parsing fails.