19 types derived from HttpContent
dotnet-svcutil-lib (1)
Microsoft.AspNetCore.Http.Connections.Client (1)
Microsoft.DotNet.Cli.Telemetry (1)
NuGet.Protocol (1)
System.Net.Http (11)
System.Net.Http.Json (1)
System.Net.Http.WinHttpHandler (1)
System.Net.Requests (1)
System.ServiceModel.Http (1)
139 references to HttpContent
Aspire.EndToEnd.Tests (1)
Aspire.Templates.Tests (1)
Binding.Http.IntegrationTests (1)
ConfigurationSchemaGenerator.Tests (1)
dotnet-svcutil-lib (10)
Microsoft.AspNetCore.InternalTesting (2)
Microsoft.AspNetCore.Mvc.Testing (7)
Microsoft.AspNetCore.TestHost (1)
Microsoft.DotNet.Cli.Telemetry (1)
Microsoft.Extensions.Http.Resilience (1)
Microsoft.ML.PerformanceTests (1)
Microsoft.NET.Build.Containers (5)
netstandard (1)
NuGet.Protocol (2)
System.Net.Http (80)
System\Net\Http\HttpClient.cs (29)
65/// e.g.: <see cref="GetAsync(string?)" />, <see cref="PostAsync(string?, HttpContent)" />.
126if (value > HttpContent.MaxBufferSize)
130SR.net_http_content_buffersize_limit, HttpContent.MaxBufferSize));
134Debug.Assert(HttpContent.MaxBufferSize <= int.MaxValue);
154_maxResponseContentBufferSize = HttpContent.MaxBufferSize;
190HttpContent.LimitArrayPoolWriteStream? buffer = null;
199HttpContent c = response.Content;
208buffer = new HttpContent.LimitArrayPoolWriteStream(
218catch (Exception e) when (HttpContent.StreamCopyExceptionNeedsWrapping(e))
220throw HttpContent.WrapStreamCopyException(e);
224return HttpContent.ReadBufferAsString(buffer, c.Headers);
264HttpContent.LimitArrayPoolWriteStream? buffer = null;
273HttpContent c = response.Content;
286buffer = new HttpContent.LimitArrayPoolWriteStream(
296catch (Exception e) when (HttpContent.StreamCopyExceptionNeedsWrapping(e))
298throw HttpContent.WrapStreamCopyException(e);
347HttpContent c = response.Content;
389public Task<HttpResponseMessage> PostAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, HttpContent? content) =>
392public Task<HttpResponseMessage> PostAsync(Uri? requestUri, HttpContent? content) =>
395public Task<HttpResponseMessage> PostAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, HttpContent? content, CancellationToken cancellationToken) =>
398public Task<HttpResponseMessage> PostAsync(Uri? requestUri, HttpContent? content, CancellationToken cancellationToken)
405public Task<HttpResponseMessage> PutAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, HttpContent? content) =>
408public Task<HttpResponseMessage> PutAsync(Uri? requestUri, HttpContent? content) =>
411public Task<HttpResponseMessage> PutAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, HttpContent? content, CancellationToken cancellationToken) =>
414public Task<HttpResponseMessage> PutAsync(Uri? requestUri, HttpContent? content, CancellationToken cancellationToken)
421public Task<HttpResponseMessage> PatchAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, HttpContent? content) =>
424public Task<HttpResponseMessage> PatchAsync(Uri? requestUri, HttpContent? content) =>
427public Task<HttpResponseMessage> PatchAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, HttpContent? content, CancellationToken cancellationToken) =>
430public Task<HttpResponseMessage> PatchAsync(Uri? requestUri, HttpContent? content, CancellationToken cancellationToken)
System.Net.Http.Json (18)
System\Net\Http\Json\HttpContentJsonExtensions.cs (11)
30public static Task<object?> ReadFromJsonAsync(this HttpContent content, Type type, JsonSerializerOptions? options, CancellationToken cancellationToken = default)
46public static Task<object?> ReadFromJsonAsync(this HttpContent content, Type type, CancellationToken cancellationToken = default)
61public static Task<T?> ReadFromJsonAsync<T>(this HttpContent content, JsonSerializerOptions? options, CancellationToken cancellationToken = default)
77public static Task<T?> ReadFromJsonAsync<T>(this HttpContent content, CancellationToken cancellationToken = default)
84private static async Task<object?> ReadFromJsonAsyncCore(HttpContent content, Type type, JsonSerializerOptions? options, CancellationToken cancellationToken)
94private static async Task<T?> ReadFromJsonAsyncCore<T>(HttpContent content, JsonSerializerOptions? options, CancellationToken cancellationToken)
102public static Task<object?> ReadFromJsonAsync(this HttpContent content, Type type, JsonSerializerContext context, CancellationToken cancellationToken = default)
109public static Task<T?> ReadFromJsonAsync<T>(this HttpContent content, JsonTypeInfo<T> jsonTypeInfo, CancellationToken cancellationToken = default)
116private static async Task<object?> ReadFromJsonAsyncCore(HttpContent content, Type type, JsonSerializerContext context, CancellationToken cancellationToken)
124private static async Task<T?> ReadFromJsonAsyncCore<T>(HttpContent content, JsonTypeInfo<T> jsonTypeInfo, CancellationToken cancellationToken)
132internal static ValueTask<Stream> GetContentStreamAsync(HttpContent content, CancellationToken cancellationToken)
System.Net.Http.WinHttpHandler (1)
System.Net.Requests (1)
System.ServiceModel.Http (4)