HttpContentExtensions
Specifies extension methods to allow strongly typed objects to be read from HttpContent instances.
Returns a Task that will yield an object of the specified type from the content instance.
public static Task<object> ReadAsAsync(this HttpContent content, Type type, CancellationToken cancellationToken)
Returns a Task that will yield an object of the specified type from the content instance using one of the provided formatters to deserialize the content.
public static Task<object> ReadAsAsync(this HttpContent content, Type type, IEnumerable<MediaTypeFormatter> formatters)
Returns a Task that will yield an object of the specified type from the content instance using one of the provided formatters to deserialize the content.
public static Task<object> ReadAsAsync(this HttpContent content, Type type, IEnumerable<MediaTypeFormatter> formatters, CancellationToken cancellationToken)
Returns a Task that will yield an object of the specified type from the content instance using one of the provided formatters to deserialize the content.
public static Task<object> ReadAsAsync(this HttpContent content, Type type, IEnumerable<MediaTypeFormatter> formatters, IFormatterLogger formatterLogger)
Returns a Task that will yield an object of the specified type from the content instance using one of the provided formatters to deserialize the content.
public static Task<object> ReadAsAsync(this HttpContent content, Type type, IEnumerable<MediaTypeFormatter> formatters, IFormatterLogger formatterLogger, CancellationToken cancellationToken)
Returns a Task that will yield an object of the specified type from the content instance using one of the provided formatters to deserialize the content.
Returns a Task that will yield an object of the specified type <typeparamref name="T" /> from the content instance.
Returns a Task that will yield an object of the specified type from the content instance.
public static Task<T> ReadAsAsync<T>(this HttpContent content, IEnumerable<MediaTypeFormatter> formatters)
Returns a Task that will yield an object of the specified type <typeparamref name="T" /> from the content instance.
public static Task<T> ReadAsAsync<T>(this HttpContent content, IEnumerable<MediaTypeFormatter> formatters, CancellationToken cancellationToken)
Returns a Task that will yield an object of the specified type from the content instance.
public static Task<T> ReadAsAsync<T>(this HttpContent content, IEnumerable<MediaTypeFormatter> formatters, IFormatterLogger formatterLogger)
Returns a Task that will yield an object of the specified type <typeparamref name="T" /> from the content instance.
public static Task<T> ReadAsAsync<T>(this HttpContent content, IEnumerable<MediaTypeFormatter> formatters, IFormatterLogger formatterLogger, CancellationToken cancellationToken)
Returns a Task that will yield an object of the specified type from the content instance.