14 types derived from HttpContent
dotnet-svcutil-lib (1)
NuGet.Protocol (1)
System.Net.Http (8)
System.Net.Http.Json (1)
System.Net.Http.WinHttpHandler (1)
System.Net.Requests (1)
System.ServiceModel.Http (1)
115 references to HttpContent
Aspire.EndToEnd.Tests (1)
Aspire.Templates.Tests (1)
Binding.Http.IntegrationTests (1)
ConfigurationSchemaGenerator.Tests (1)
dotnet-svcutil-lib (10)
Microsoft.Extensions.Http.Resilience (1)
Microsoft.ML.PerformanceTests (1)
Microsoft.NET.Build.Containers (5)
netstandard (1)
NuGet.Protocol (2)
System.Net.Http (67)
System\Net\Http\HttpClient.cs (29)
65/// e.g.: <see cref="GetAsync(string?)" />, <see cref="PostAsync(string?, HttpContent)" />.
121if (value > HttpContent.MaxBufferSize)
125SR.net_http_content_buffersize_limit, HttpContent.MaxBufferSize));
129Debug.Assert(HttpContent.MaxBufferSize <= int.MaxValue);
149_maxResponseContentBufferSize = HttpContent.MaxBufferSize;
185HttpContent.LimitArrayPoolWriteStream? buffer = null;
194HttpContent c = response.Content;
203buffer = new HttpContent.LimitArrayPoolWriteStream(
213catch (Exception e) when (HttpContent.StreamCopyExceptionNeedsWrapping(e))
215throw HttpContent.WrapStreamCopyException(e);
219return HttpContent.ReadBufferAsString(buffer, c.Headers);
259HttpContent.LimitArrayPoolWriteStream? buffer = null;
268HttpContent c = response.Content;
281buffer = new HttpContent.LimitArrayPoolWriteStream(
291catch (Exception e) when (HttpContent.StreamCopyExceptionNeedsWrapping(e))
293throw HttpContent.WrapStreamCopyException(e);
342HttpContent c = response.Content;
384public Task<HttpResponseMessage> PostAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, HttpContent? content) =>
387public Task<HttpResponseMessage> PostAsync(Uri? requestUri, HttpContent? content) =>
390public Task<HttpResponseMessage> PostAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, HttpContent? content, CancellationToken cancellationToken) =>
393public Task<HttpResponseMessage> PostAsync(Uri? requestUri, HttpContent? content, CancellationToken cancellationToken)
400public Task<HttpResponseMessage> PutAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, HttpContent? content) =>
403public Task<HttpResponseMessage> PutAsync(Uri? requestUri, HttpContent? content) =>
406public Task<HttpResponseMessage> PutAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, HttpContent? content, CancellationToken cancellationToken) =>
409public Task<HttpResponseMessage> PutAsync(Uri? requestUri, HttpContent? content, CancellationToken cancellationToken)
416public Task<HttpResponseMessage> PatchAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, HttpContent? content) =>
419public Task<HttpResponseMessage> PatchAsync(Uri? requestUri, HttpContent? content) =>
422public Task<HttpResponseMessage> PatchAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, HttpContent? content, CancellationToken cancellationToken) =>
425public 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)