19 types derived from HttpContent
dotnet-svcutil-lib (1)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageContent.cs (1)
17internal abstract class MessageContent : HttpContent
HttpStress (3)
Program.cs (3)
663private sealed class CancelableContent : HttpContent 690private sealed class StringDuplexContent : HttpContent 707private sealed class ByteAtATimeNoLengthContent : HttpContent
Interop.FunctionalTests (3)
Http3\Http3RequestTests.cs (1)
34private class StreamingHttpContent : HttpContent
HttpClientHttp2InteropTests.cs (2)
196private class BulkContent : HttpContent 451private class StreamingContent : HttpContent
Microsoft.AspNetCore.Http.Connections.Client (1)
Internal\SendUtils.cs (1)
91private sealed class ReadOnlySequenceContent : HttpContent
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (3)
Listener\RequestBodyTests.cs (1)
211private class StaggardContent : HttpContent
RequestBodyLimitTests.cs (1)
421private class StaggardContent : HttpContent
RequestBodyTests.cs (1)
355private class StaggardContent : HttpContent
Microsoft.AspNetCore.TestHost.Tests (2)
ClientHandlerTests.cs (1)
738private class UnlimitedContent : HttpContent
TestClientTests.cs (1)
687private class PushContent : HttpContent
System.Net.Http (5)
artifacts\obj\System.Net.Http\Debug\net10.0\System.Net.Http.notsupported.cs (5)
9public partial class ByteArrayContent : System.Net.Http.HttpContent 372public partial class MultipartContent : System.Net.Http.HttpContent, System.Collections.Generic.IEnumerable<System.Net.Http.HttpContent>, System.Collections.IEnumerable 399public sealed partial class ReadOnlyMemoryContent : System.Net.Http.HttpContent 468public partial class StreamContent : System.Net.Http.HttpContent
System.Net.Http.Json (1)
System\Net\Http\Json\JsonContent.cs (1)
16public sealed partial class JsonContent : HttpContent
87 references to HttpContent
Aspire.EndToEnd.Tests (1)
tests\Shared\TemplatesTesting\AspireProject.cs (1)
531if (args.Outcome.Result?.Content is HttpContent content && (await content.ReadAsStringAsync()) is string contentStr)
Aspire.Templates.Tests (1)
tests\Shared\TemplatesTesting\AspireProject.cs (1)
531if (args.Outcome.Result?.Content is HttpContent content && (await content.ReadAsStringAsync()) is string contentStr)
Binding.Http.IntegrationTests (1)
BasicHttpBindingTests.4.0.0.cs (1)
162var oldContent = message.Content;
ConfigurationSchemaGenerator.Tests (1)
GeneratorTests.cs (1)
49MetadataReference.CreateFromFile(typeof(HttpContent).Assembly.Location)
dotnet-svcutil-lib (10)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpRequestMessageProperty.cs (3)
321HttpContent content = this.HttpRequestMessage.Content; 338HttpContent content = this.HttpRequestMessage.Content; 343HttpContent newContent = new ByteArrayContent(Array.Empty<byte>());
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpResponseMessageHelper.cs (3)
129var content = _httpResponseMessage.Content; 168var content = _httpResponseMessage.Content; 291var content = _httpResponseMessage.Content;
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpResponseMessageProperty.cs (3)
345HttpContent content = this.HttpResponseMessage.Content; 362HttpContent content = this.HttpResponseMessage.Content; 367HttpContent newContent = new ByteArrayContent(Array.Empty<byte>());
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageContent.cs (1)
154internal static HttpContent Create(HttpChannelFactory<IRequestChannel> factory, Message request, TimeoutHelper _timeoutHelper)
InMemory.FunctionalTests (2)
TestTransport\InMemoryHttpClientSlim.cs (2)
68public async Task<string> PostAsync(string requestUri, HttpContent content, bool validateCertificate = true) 71public async Task<string> PostAsync(Uri requestUri, HttpContent content, bool validateCertificate = true)
Interop.FunctionalTests (1)
HttpClientHttp2InteropTests.cs (1)
1696private static HttpRequestMessage CreateRequestMessage(HttpMethod method, string url, HttpContent content)
Microsoft.AspNetCore.HeaderPropagation.Tests (1)
HeaderPropagationMessageHandlerTest.cs (1)
262public HttpContent Content { get; private set; }
Microsoft.AspNetCore.Http.Extensions.Tests (12)
RequestDelegateFactoryTests.cs (2)
2048public static TheoryData<HttpContent, string> FormContent 2052var dataset = new TheoryData<HttpContent, string>();
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)
HttpClientSlim.cs (2)
68public static async Task<string> PostAsync(string requestUri, HttpContent content, bool validateCertificate = true) 72public static async Task<string> PostAsync(Uri requestUri, HttpContent content, bool validateCertificate = true)
Microsoft.AspNetCore.Mvc.FunctionalTests (1)
TempDataInCookiesUsingCookieConsentTest.cs (1)
99private HttpRequestMessage GetPostRequest(string path, HttpContent content, HttpResponseMessage response)
Microsoft.AspNetCore.Mvc.Testing (7)
Handlers\RedirectHandler.cs (7)
49var originalRequestContent = HasBody(request) ? await DuplicateRequestContent(request) : null; 66private static async Task<HttpContent?> DuplicateRequestContent(HttpRequestMessage request) 72var originalRequestContent = request.Content; 84HttpContent originalRequestContent, 85HttpContent newRequestContent, 86HttpContent contentCopy) 135HttpContent? originalContent)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (3)
Listener\RequestBodyTests.cs (1)
200private async Task<string> SendRequestAsync(string uri, HttpContent content)
RequestBodyLimitTests.cs (1)
410private async Task<string> SendRequestAsync(string uri, HttpContent content, bool chunked = false)
RequestBodyTests.cs (1)
299private async Task<string> SendRequestAsync(string uri, HttpContent content)
Microsoft.AspNetCore.SignalR.Client.Tests (1)
ResponseUtils.cs (1)
26public static HttpResponseMessage CreateResponse(HttpStatusCode statusCode, HttpContent payload)
Microsoft.AspNetCore.TestHost (1)
ClientHandler.cs (1)
82var requestContent = request.Content;
Microsoft.Extensions.Http.Resilience (1)
Internal\RequestMessageSnapshot.cs (1)
23private HttpContent? _content;
Microsoft.ML.PerformanceTests (1)
ImageClassificationBench.cs (1)
230public static async Task ReadAsFileAsync(this HttpContent content, string filename, bool overwrite)
netstandard (1)
netstandard.cs (1)
1126[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.Http.HttpContent))]
ServerComparison.FunctionalTests (1)
ResponseCompressionTests.cs (1)
224private static async Task<string> ReadCompressedAsStringAsync(HttpContent content)
System.Net.Http (20)
artifacts\obj\System.Net.Http\Debug\net10.0\System.Net.Http.notsupported.cs (20)
84public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> PatchAsync([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("Uri")] string? requestUri, System.Net.Http.HttpContent? content) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } 85public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> PatchAsync([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("Uri")] string? requestUri, System.Net.Http.HttpContent? content, System.Threading.CancellationToken cancellationToken) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } 86public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> PatchAsync(System.Uri? requestUri, System.Net.Http.HttpContent? content) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } 87public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> PatchAsync(System.Uri? requestUri, System.Net.Http.HttpContent? content, System.Threading.CancellationToken cancellationToken) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } 88public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> PostAsync([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("Uri")] string? requestUri, System.Net.Http.HttpContent? content) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } 89public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> PostAsync([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("Uri")] string? requestUri, System.Net.Http.HttpContent? content, System.Threading.CancellationToken cancellationToken) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } 90public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> PostAsync(System.Uri? requestUri, System.Net.Http.HttpContent? content) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } 91public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> PostAsync(System.Uri? requestUri, System.Net.Http.HttpContent? content, System.Threading.CancellationToken cancellationToken) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } 92public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> PutAsync([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("Uri")] string? requestUri, System.Net.Http.HttpContent? content) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } 93public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> PutAsync([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("Uri")] string? requestUri, System.Net.Http.HttpContent? content, System.Threading.CancellationToken cancellationToken) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } 94public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> PutAsync(System.Uri? requestUri, System.Net.Http.HttpContent? content) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } 95public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> PutAsync(System.Uri? requestUri, System.Net.Http.HttpContent? content, System.Threading.CancellationToken cancellationToken) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } 291public System.Net.Http.HttpContent? Content { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } set { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } } 344public System.Net.Http.HttpContent Content { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } set { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } } 377public System.Net.Http.HeaderEncodingSelector<System.Net.Http.HttpContent>? HeaderEncodingSelector { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } set { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } } 378public virtual void Add(System.Net.Http.HttpContent content) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } 383public System.Collections.Generic.IEnumerator<System.Net.Http.HttpContent> GetEnumerator() { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } 394public override void Add(System.Net.Http.HttpContent content) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } 395public void Add(System.Net.Http.HttpContent content, string name) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } 396public void Add(System.Net.Http.HttpContent content, string name, string fileName) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); }
System.Net.Http.Json (18)
System\Net\Http\Json\HttpContentJsonExtensions.AsyncEnumerable.cs (5)
31this HttpContent content, 51this HttpContent content, 73this HttpContent content, 85HttpContent content, 94HttpContent content,
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\Json\HttpContentJsonExtensions.netcoreapp.cs (1)
13private static Task<Stream> ReadHttpContentStreamAsync(HttpContent content, CancellationToken cancellationToken)
System\Net\Http\Json\JsonHelpers.cs (1)
30internal static Encoding? GetEncoding(HttpContent content)