155 references to HttpCompletionOption
dotnet-svcutil-lib (1)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpChannelFactory.cs (1)
937_httpResponseMessage = await _httpClient.SendAsync(_httpRequestMessage, HttpCompletionOption.ResponseHeadersRead, _httpSendCts.Token);
HttpStress (5)
Program.cs (5)
218Task<HttpResponseMessage> t = ctx.HttpClient.SendAsync(req, HttpCompletionOption.ResponseHeadersRead, cts.Token); 258using (HttpResponseMessage m = await ctx.HttpClient.SendAsync(req, HttpCompletionOption.ResponseHeadersRead)) 272using (HttpResponseMessage m = await ctx.HttpClient.SendAsync(req, HttpCompletionOption.ResponseHeadersRead)) 288using (HttpResponseMessage m = await ctx.HttpClient.SendAsync(req, HttpCompletionOption.ResponseHeadersRead)) 306Task<HttpResponseMessage> t = ctx.HttpClient.SendAsync(req, HttpCompletionOption.ResponseHeadersRead, cts.Token);
IIS.FunctionalTests (2)
Http3Tests.cs (2)
136var response = await client.GetAsync(address, HttpCompletionOption.ResponseHeadersRead); 153var response = await client.GetAsync(address, HttpCompletionOption.ResponseHeadersRead);
InMemory.FunctionalTests (3)
KestrelMetricsTests.cs (3)
574responseMessage = await httpClient.SendAsync(httpRequestMessage, HttpCompletionOption.ResponseHeadersRead).DefaultTimeout(); 653responseMessage = await httpClient.SendAsync(httpRequestMessage, HttpCompletionOption.ResponseHeadersRead).DefaultTimeout(); 813using var responseMessage = await httpClient.SendAsync(httpRequestMessage, HttpCompletionOption.ResponseHeadersRead).DefaultTimeout();
Interop.FunctionalTests (18)
Http3\Http3RequestTests.cs (4)
1019var responseTask = client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead); 1116var responseTask = client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead); 1262var responseTask = client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead); 1321var response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead);
HttpClientHttp2InteropTests.cs (14)
92using var response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead).DefaultTimeout(); 137using var response = await client.GetAsync(url, HttpCompletionOption.ResponseHeadersRead).DefaultTimeout(); 186using var response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead).DefaultTimeout(); 299var responseTask = client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead).DefaultTimeout(); 376var responseTask = client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead).DefaultTimeout(); 436using var response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead).DefaultTimeout(); 567var response = await client.GetAsync(url, HttpCompletionOption.ResponseHeadersRead).DefaultTimeout(); 625var response = await client.GetAsync(url, HttpCompletionOption.ResponseHeadersRead).DefaultTimeout(); 653var response = await client.GetAsync(url, HttpCompletionOption.ResponseHeadersRead).DefaultTimeout(); 682var response = await client.GetAsync(url, HttpCompletionOption.ResponseHeadersRead).DefaultTimeout(); 735using var response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead).DefaultTimeout(); 792var requestTask = client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead).DefaultTimeout(); 972var response = await client.GetAsync(url, HttpCompletionOption.ResponseHeadersRead).DefaultTimeout(); 1013var response = await client.GetAsync(url, HttpCompletionOption.ResponseHeadersRead).DefaultTimeout();
Microsoft.AspNetCore.Http.Connections.Client (3)
HttpConnection.cs (1)
485using (var response = await httpClient.SendAsync(request, HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false))
Internal\SendUtils.cs (1)
51using (var response = await httpClient.SendAsync(request, HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false))
Internal\ServerSentEventsTransport.cs (1)
62response = await _httpClient.SendAsync(request, HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
Microsoft.AspNetCore.ResponseCompression.Tests (8)
ResponseCompressionMiddlewareTest.cs (8)
656var response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead); 701var response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead); 753var response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead); 806var response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead); 876var response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead); 940var response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead); 1004var response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead); 1215var response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead);
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (9)
Http3Tests.cs (2)
206var response = await client.GetAsync(address, HttpCompletionOption.ResponseHeadersRead); 232var response = await client.GetAsync(address, HttpCompletionOption.ResponseHeadersRead);
Listener\ResponseBodyTests.cs (5)
368var responseTask = client.GetAsync(address, HttpCompletionOption.ResponseHeadersRead); 408var responseTask = client.GetAsync(address, HttpCompletionOption.ResponseHeadersRead); 447var responseTask = client.GetAsync(address, HttpCompletionOption.ResponseHeadersRead); 481var responseTask = client.GetAsync(address, HttpCompletionOption.ResponseHeadersRead); 510return await client.GetAsync(uri, HttpCompletionOption.ResponseHeadersRead, cancellationToken);
ResponseSendFileTests.cs (2)
614var response = await client.GetAsync(address, HttpCompletionOption.ResponseHeadersRead); 663var response = await client.GetAsync(address, HttpCompletionOption.ResponseHeadersRead);
Microsoft.AspNetCore.SpaServices.Extensions (1)
Proxying\SpaProxy.cs (1)
88HttpCompletionOption.ResponseHeadersRead,
Microsoft.AspNetCore.TestHost.Tests (24)
ClientHandlerTests.cs (9)
415HttpCompletionOption.ResponseHeadersRead); 434HttpCompletionOption.ResponseHeadersRead); 452HttpCompletionOption.ResponseHeadersRead); 474HttpCompletionOption.ResponseHeadersRead); 517HttpCompletionOption.ResponseHeadersRead)); 533HttpCompletionOption.ResponseHeadersRead); 553HttpCompletionOption.ResponseHeadersRead)); 569HttpCompletionOption.ResponseHeadersRead)); 594HttpCompletionOption.ResponseHeadersRead));
RequestLifetimeTests.cs (4)
28var ex = await Assert.ThrowsAsync<OperationCanceledException>(() => client.GetAsync("/", HttpCompletionOption.ResponseHeadersRead)); 44var ex = await Assert.ThrowsAsync<OperationCanceledException>(() => client.GetAsync("/", HttpCompletionOption.ResponseHeadersRead)); 63var response = await client.GetAsync("/", HttpCompletionOption.ResponseHeadersRead); 86using var response = await client.GetAsync("/", HttpCompletionOption.ResponseHeadersRead);
ResponseBodyTests.cs (1)
137var response = await client.GetAsync("/", HttpCompletionOption.ResponseHeadersRead);
ResponseResetTests.cs (3)
100var rex = await Assert.ThrowsAsync<HttpResetTestException>(() => client.GetAsync("/", HttpCompletionOption.ResponseHeadersRead)); 122var response = await client.GetAsync("/", HttpCompletionOption.ResponseHeadersRead); 148var response = await client.GetAsync("/", HttpCompletionOption.ResponseHeadersRead);
TestClientTests.cs (7)
205var response = await client.SendAsync(httpRequest, HttpCompletionOption.ResponseHeadersRead).DefaultTimeout(); 313var response = await client.SendAsync(httpRequest, HttpCompletionOption.ResponseHeadersRead).DefaultTimeout(); 370var response = await client.SendAsync(httpRequest, HttpCompletionOption.ResponseHeadersRead).DefaultTimeout(); 432var response = await client.SendAsync(httpRequest, HttpCompletionOption.ResponseHeadersRead).DefaultTimeout(); 479var response = await client.SendAsync(httpRequest, HttpCompletionOption.ResponseHeadersRead).DefaultTimeout(); 530var response = await client.SendAsync(httpRequest, HttpCompletionOption.ResponseHeadersRead).DefaultTimeout(); 851var response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead);
Microsoft.AspNetCore.WebSockets.Tests (1)
WebSocketMiddlewareTests.cs (1)
840var response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead);
Microsoft.Build.Tasks.Core (1)
DownloadFile.cs (1)
153using (HttpResponseMessage response = await client.GetAsync(uri, HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false))
Microsoft.DotNet.Build.Tasks.Feed (1)
src\PublishArtifactsInManifestBase.cs (1)
973using HttpResponseMessage response = await client.GetAsync(uri, HttpCompletionOption.ResponseHeadersRead, timeoutTokenSource.Token);
Microsoft.Extensions.Http.Diagnostics.PerformanceTests (48)
Benchmarks\HugeHttpCLientLoggingBenchmark.cs (16)
47var response = await _hugeNoLog.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 57var response = await _hugeNoLog.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 67var response = await _hugeLogAll.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 77var response = await _hugeLogAll.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 87var response = await _hugeLogRequest.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 97var response = await _hugeLogRequest.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 107var response = await _hugeLogResponse.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 117var response = await _hugeLogResponse.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 127var response = await _hugeNoLogChunked.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 137var response = await _hugeNoLogChunked.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 147var response = await _hugeLogAllChunked.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 157var response = await _hugeLogAllChunked.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 167var response = await _hugeLogRequestChunked.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 177var response = await _hugeLogRequestChunked.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 187var response = await _hugeLogResponseChunked.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 197var response = await _hugeLogResponseChunked.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None)
Benchmarks\MediumHttpClientLoggingBenchmark.cs (16)
47var response = await _mediumNoLog.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 57var response = await _mediumNoLog.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 67var response = await _mediumLogAll.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 77var response = await _mediumLogAll.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 87var response = await _mediumLogRequest.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 97var response = await _mediumLogRequest.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 107var response = await _mediumLogResponse.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 117var response = await _mediumLogResponse.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 127var response = await _mediumNoLogChunked.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 137var response = await _mediumNoLogChunked.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 147var response = await _mediumLogAllChunked.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 157var response = await _mediumLogAllChunked.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 167var response = await _mediumLogRequestChunked.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 177var response = await _mediumLogRequestChunked.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 187var response = await _mediumLogResponseChunked.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 197var response = await _mediumLogResponseChunked.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None)
Benchmarks\SmallHttpClientLoggingBenchmark.cs (16)
47var response = await _smallNoLog.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 57var response = await _smallNoLog.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 67var response = await _smallLogAll.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 77var response = await _smallLogAll.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 87var response = await _smallLogRequest.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 97var response = await _smallLogRequest.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 107var response = await _smallLogResponse.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 117var response = await _smallLogResponse.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 127var response = await _smallNoLogChunked.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 137var response = await _smallNoLogChunked.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 147var response = await _smallLogAllChunked.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 157var response = await _smallLogAllChunked.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 167var response = await _smallLogRequestChunked.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 177var response = await _smallLogRequestChunked.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 187var response = await _smallLogResponseChunked.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 197var response = await _smallLogResponseChunked.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None)
Microsoft.Extensions.Http.Diagnostics.Tests (7)
Logging\AcceptanceTests.cs (5)
198.SendAsync(httpRequestMessage, HttpCompletionOption.ResponseHeadersRead) 593_ = await client.SendAsync(httpRequestMessage, HttpCompletionOption.ResponseHeadersRead); 619_ = await client.SendAsync(httpRequestMessage, HttpCompletionOption.ResponseHeadersRead); 642_ = await client.SendAsync(httpRequestMessage, HttpCompletionOption.ResponseHeadersRead); 688var content = await client.SendAsync(httpRequestMessage, HttpCompletionOption.ResponseHeadersRead);
Logging\Internal\TestHttpClient1.cs (1)
20return _httpClient.SendAsync(httpRequestMessage, HttpCompletionOption.ResponseHeadersRead);
Logging\Internal\TestHttpClient2.cs (1)
20return _httpClient.SendAsync(httpRequestMessage, HttpCompletionOption.ResponseHeadersRead);
Microsoft.ML.PerformanceTests (1)
ImageClassificationBench.cs (1)
163var headerResponse = client.GetAsync(url, HttpCompletionOption.ResponseHeadersRead).Result;
Microsoft.ML.Tokenizers (1)
Utils\Helpers.netstandard.cs (1)
25HttpResponseMessage response = await client.GetAsync(url, HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
netstandard (1)
netstandard.cs (1)
1125[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.Http.HttpCompletionOption))]
System.Net.Http (13)
System\Net\Http\HttpClient.cs (13)
22private const HttpCompletionOption DefaultCompletionOption = HttpCompletionOption.ResponseContentRead; 369public Task<HttpResponseMessage> GetAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, HttpCompletionOption completionOption) => 372public Task<HttpResponseMessage> GetAsync(Uri? requestUri, HttpCompletionOption completionOption) => 381public Task<HttpResponseMessage> GetAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, HttpCompletionOption completionOption, CancellationToken cancellationToken) => 384public Task<HttpResponseMessage> GetAsync(Uri? requestUri, HttpCompletionOption completionOption, CancellationToken cancellationToken) => 456public HttpResponseMessage Send(HttpRequestMessage request, HttpCompletionOption completionOption) => 464public HttpResponseMessage Send(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken) 509public Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption) => 512public Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken) 521HttpRequestMessage request, HttpCompletionOption completionOption, 580private static bool ShouldBufferResponse(HttpCompletionOption completionOption, HttpRequestMessage request) => 581completionOption == HttpCompletionOption.ResponseContentRead &&
System.Net.Http.Json (3)
System\Net\Http\Json\HttpClientJsonExtensions.Get.AsyncEnumerable.cs (1)
162using HttpResponseMessage response = await client.GetAsync(requestUri, HttpCompletionOption.ResponseHeadersRead, cancellationToken)
System\Net\Http\Json\HttpClientJsonExtensions.Get.cs (2)
19static (client, uri, cancellation) => client.GetAsync(uri, HttpCompletionOption.ResponseHeadersRead, cancellation); 29FromJsonAsyncCore(static (client, uri, cancellation) => client.GetAsync(uri, HttpCompletionOption.ResponseHeadersRead, cancellation), client, requestUri, type, options, cancellationToken);
System.Net.Requests (3)
System\Net\HttpWebRequest.cs (3)
1226HttpCompletionOption completionOption = _allowReadStreamBuffering ? HttpCompletionOption.ResponseContentRead : HttpCompletionOption.ResponseHeadersRead;
System.Net.WebSockets.Client (1)
System\Net\WebSockets\WebSocketHandle.Managed.cs (1)
128? client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead, externalAndAbortCancellation.Token)