23 types derived from HttpContent
dotnet-svcutil-lib (1)
HttpStress (3)
Interop.FunctionalTests (3)
Microsoft.AspNetCore.Http.Connections.Client (1)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (3)
Microsoft.AspNetCore.TestHost.Tests (2)
Microsoft.Build.Tasks.UnitTests (1)
System.Net.Http (8)
System.Net.Http.Json (1)
133 references to HttpContent
Aspire.EndToEnd.Tests (1)
Aspire.Workload.Tests (1)
Binding.Http.IntegrationTests (1)
ConfigurationSchemaGenerator.Tests (1)
dotnet-svcutil-lib (10)
InMemory.FunctionalTests (2)
Interop.FunctionalTests (1)
Microsoft.AspNetCore.HeaderPropagation.Tests (1)
Microsoft.AspNetCore.Http.Extensions.Tests (12)
RequestDelegateGenerator\RequestDelegateCreationTests.Forms.cs (10)
513public static TheoryData<HttpContent, string> FormContent
517var dataset = new TheoryData<HttpContent, string>();
533public async Task RequestDelegatePopulatesFromIFormCollectionParameter(HttpContent content, string contentType)
580public async Task RequestDelegatePopulatesFromIFormCollectionParameterWithAttribute(HttpContent content, string contentType)
627public async Task RequestDelegatePopulatesFromOptionalFormParameter(HttpContent content, string contentType)
655public async Task RequestDelegatePopulatesFromMultipleRequiredFormParameters(HttpContent content, string contentType)
688public async Task RequestDelegatePopulatesFromOptionalMissingFormParameter(HttpContent content, string contentType)
719public async Task RequestDelegatePopulatesFromFormParameterWithMetadata(HttpContent content, string contentType)
748public async Task RequestDelegatePopulatesFromFormAndBoundParameter(HttpContent content, string contentType)
858public async Task RequestDelegateSets400ResponseIfRequiredFormItemNotSpecified(HttpContent content, string contentType)
Microsoft.AspNetCore.InternalTesting (2)
Microsoft.AspNetCore.Mvc.FunctionalTests (1)
Microsoft.AspNetCore.Mvc.Testing (7)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (3)
Microsoft.AspNetCore.SignalR.Client.Tests (1)
Microsoft.AspNetCore.TestHost (1)
Microsoft.Extensions.Http.Resilience (1)
Microsoft.ML.PerformanceTests (1)
netstandard (1)
ServerComparison.FunctionalTests (1)
System.Net.Http (64)
System\Net\Http\HttpClient.cs (27)
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;
193HttpContent c = response.Content;
202using var buffer = new HttpContent.LimitArrayPoolWriteStream(
212catch (Exception e) when (HttpContent.StreamCopyExceptionNeedsWrapping(e))
214throw HttpContent.WrapStreamCopyException(e);
218return HttpContent.ReadBufferAsString(buffer, c.Headers);
265HttpContent c = response.Content;
278using var buffer = new HttpContent.LimitArrayPoolWriteStream(
288catch (Exception e) when (HttpContent.StreamCopyExceptionNeedsWrapping(e))
290throw HttpContent.WrapStreamCopyException(e);
338HttpContent c = response.Content;
380public Task<HttpResponseMessage> PostAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, HttpContent? content) =>
383public Task<HttpResponseMessage> PostAsync(Uri? requestUri, HttpContent? content) =>
386public Task<HttpResponseMessage> PostAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, HttpContent? content, CancellationToken cancellationToken) =>
389public Task<HttpResponseMessage> PostAsync(Uri? requestUri, HttpContent? content, CancellationToken cancellationToken)
396public Task<HttpResponseMessage> PutAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, HttpContent? content) =>
399public Task<HttpResponseMessage> PutAsync(Uri? requestUri, HttpContent? content) =>
402public Task<HttpResponseMessage> PutAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, HttpContent? content, CancellationToken cancellationToken) =>
405public Task<HttpResponseMessage> PutAsync(Uri? requestUri, HttpContent? content, CancellationToken cancellationToken)
412public Task<HttpResponseMessage> PatchAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, HttpContent? content) =>
415public Task<HttpResponseMessage> PatchAsync(Uri? requestUri, HttpContent? content) =>
418public Task<HttpResponseMessage> PatchAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, HttpContent? content, CancellationToken cancellationToken) =>
421public 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)
49public static Task<object?> ReadFromJsonAsync(this HttpContent content, Type type, CancellationToken cancellationToken = default)
64public static Task<T?> ReadFromJsonAsync<T>(this HttpContent content, JsonSerializerOptions? options, CancellationToken cancellationToken = default)
83public static Task<T?> ReadFromJsonAsync<T>(this HttpContent content, CancellationToken cancellationToken = default)
90private static async Task<object?> ReadFromJsonAsyncCore(HttpContent content, Type type, JsonSerializerOptions? options, CancellationToken cancellationToken)
100private static async Task<T?> ReadFromJsonAsyncCore<T>(HttpContent content, JsonSerializerOptions? options, CancellationToken cancellationToken)
108public static Task<object?> ReadFromJsonAsync(this HttpContent content, Type type, JsonSerializerContext context, CancellationToken cancellationToken = default)
118public static Task<T?> ReadFromJsonAsync<T>(this HttpContent content, JsonTypeInfo<T> jsonTypeInfo, CancellationToken cancellationToken = default)
128private static async Task<object?> ReadFromJsonAsyncCore(HttpContent content, Type type, JsonSerializerContext context, CancellationToken cancellationToken)
136private static async Task<T?> ReadFromJsonAsyncCore<T>(HttpContent content, JsonTypeInfo<T> jsonTypeInfo, CancellationToken cancellationToken)
144internal static ValueTask<Stream> GetContentStreamAsync(HttpContent content, CancellationToken cancellationToken)
System.Net.Requests (2)