170 instantiations of HttpResponseMessage
InMemory.FunctionalTests (1)
TestTransport\InMemoryHttpClientSlim.cs (1)
99new HttpResponseMessage(status).EnsureSuccessStatusCode();
Microsoft.Arcade.Common (2)
ArcadeHttpMessageHandler.cs (2)
24return Task.FromResult(new HttpResponseMessage() 31return Task.FromResult(new HttpResponseMessage()
Microsoft.AspNetCore.Authentication.Test (22)
FacebookTests.cs (3)
335var res = new HttpResponseMessage(HttpStatusCode.OK); 344var res = new HttpResponseMessage(HttpStatusCode.OK); 480var res = new HttpResponseMessage(code);
GoogleTests.cs (1)
1124var res = new HttpResponseMessage(code);
MicrosoftAccountTests.cs (1)
427var res = new HttpResponseMessage(HttpStatusCode.OK);
OAuthTests.cs (1)
535var res = new HttpResponseMessage(code);
OpenIdConnect\OpenIdConnectChallengeTests.cs (3)
976return new HttpResponseMessage() 984return new HttpResponseMessage() { Content = new StringContent("{ }", Encoding.ASCII, "application/json") }; 994return new HttpResponseMessage() { Content = new StringContent("{ \"request_uri\": \"my_reference_value\", \"expires_in\": 60}", Encoding.ASCII, "application/json") };
OpenIdConnect\OpenIdConnectEventTests.cs (2)
1395return Task.FromResult(new HttpResponseMessage() 1403return Task.FromResult(new HttpResponseMessage() { Content = new StringContent("{ }", Encoding.ASCII, "application/json") });
OpenIdConnect\OpenIdConnectEventTests_Handler.cs (2)
1390return Task.FromResult(new HttpResponseMessage() 1398return Task.FromResult(new HttpResponseMessage() { Content = new StringContent("{ }", Encoding.ASCII, "application/json") });
OpenIdConnect\TestSettings.cs (1)
340return new HttpResponseMessage()
TwitterTests.cs (6)
399var res = new HttpResponseMessage(HttpStatusCode.OK); 468var res = new HttpResponseMessage(HttpStatusCode.OK); 484var res = new HttpResponseMessage(HttpStatusCode.OK); 596return new HttpResponseMessage(HttpStatusCode.OK) 611return new HttpResponseMessage(HttpStatusCode.Forbidden) 626return new HttpResponseMessage(HttpStatusCode.Forbidden)
WsFederation\WsFederationTest.cs (1)
453var newResponse = new HttpResponseMessage() { Content = new StringContent(metadata, Encoding.UTF8, "text/xml") };
WsFederation\WsFederationTest_Handler.cs (1)
449var newResponse = new HttpResponseMessage() { Content = new StringContent(metadata, Encoding.UTF8, "text/xml") };
Microsoft.AspNetCore.HeaderPropagation.Tests (2)
HeaderPropagationIntegrationTest.cs (1)
235return Task.FromResult(new HttpResponseMessage());
HeaderPropagationMessageHandlerTest.cs (1)
269return Task.FromResult(new HttpResponseMessage());
Microsoft.AspNetCore.InternalTesting (1)
HttpClientSlim.cs (1)
102new HttpResponseMessage(status).EnsureSuccessStatusCode();
Microsoft.AspNetCore.SignalR.Client.Tests (16)
LongPollingTransportTests.cs (3)
725responseTaskCompletionSource.TrySetResult(new HttpResponseMessage(HttpStatusCode.OK)); 729responseTaskCompletionSource.TrySetResult(new HttpResponseMessage(HttpStatusCode.NoContent)); 733return await Task.FromResult(new HttpResponseMessage(HttpStatusCode.OK));
ResponseUtils.cs (1)
28return new HttpResponseMessage(statusCode)
ServerSentEventsTransportTests.cs (12)
44return new HttpResponseMessage { Content = new StreamContent(mockStream.Object) }; 91return Task.FromResult(new HttpResponseMessage { Content = new StreamContent(mockStream.Object) }); 144return new HttpResponseMessage { Content = new StreamContent(mockStream.Object) }; 197return new HttpResponseMessage { Content = new StreamContent(mockStream.Object) }; 250return new HttpResponseMessage { Content = new StreamContent(mockStream.Object) }; 277return new HttpResponseMessage { Content = new StringContent("data: 3:abc\r\n\r\n") }; 325return new HttpResponseMessage { Content = new StreamContent(mockStream.Object) }; 366return new HttpResponseMessage { Content = new StringContent(string.Empty) }; 393return new HttpResponseMessage { Content = new StringContent(string.Empty) }; 419responseTaskCompletionSource.SetResult(new HttpResponseMessage(HttpStatusCode.OK)); 423responseTaskCompletionSource.SetResult(new HttpResponseMessage(HttpStatusCode.NoContent)); 478return new HttpResponseMessage { Content = new StreamContent(new OneAtATimeStream(messageParts)) };
Microsoft.AspNetCore.SpaServices.Extensions.Tests (1)
SpaProxyTests.cs (1)
27.ReturnsAsync(new HttpResponseMessage
Microsoft.AspNetCore.TestHost (1)
ClientHandler.cs (1)
192var response = new HttpResponseMessage();
Microsoft.AspNetCore.Testing.Tests (3)
TestResources\ReturningHttpClientHandler.cs (2)
16return new(HttpStatusCode.Gone); 22return Task.FromResult(new HttpResponseMessage(HttpStatusCode.Gone));
TestResources\TestHandler.cs (1)
16return Task.FromResult(new HttpResponseMessage(HttpStatusCode.OK));
Microsoft.Build.Tasks.UnitTests (11)
DownloadFile_Tests.cs (11)
38HttpMessageHandler = new MockHttpMessageHandler((message, token) => new HttpResponseMessage(HttpStatusCode.OK) 67HttpMessageHandler = new MockHttpMessageHandler((message, token) => new HttpResponseMessage(HttpStatusCode.OK) 92using HttpResponseMessage response = new HttpResponseMessage(HttpStatusCode.OK) 146HttpMessageHandler = new MockHttpMessageHandler((message, token) => new HttpResponseMessage(HttpStatusCode.OK) 186HttpMessageHandler = new MockHttpMessageHandler((message, token) => new HttpResponseMessage(HttpStatusCode.NotFound)), 210HttpMessageHandler = new MockHttpMessageHandler((message, token) => new HttpResponseMessage(HttpStatusCode.OK) 241HttpMessageHandler = new MockHttpMessageHandler((message, token) => new HttpResponseMessage(HttpStatusCode.RequestTimeout)), 290return new HttpResponseMessage(HttpStatusCode.InternalServerError); 293return new HttpResponseMessage(HttpStatusCode.OK) 323HttpMessageHandler = new MockHttpMessageHandler((message, token) => new HttpResponseMessage(HttpStatusCode.OK) 352HttpMessageHandler = new MockHttpMessageHandler((message, token) => new HttpResponseMessage(HttpStatusCode.OK)
Microsoft.DotNet.Build.Tasks.Feed.Tests (19)
GeneralTests.cs (6)
64new HttpResponseMessage(feedResponseStatusCode)); 86new HttpResponseMessage(initialResponseStatusCode), 87new HttpResponseMessage(HttpStatusCode.OK) 118var response = new HttpResponseMessage(feedResponseStatusCode); 156new HttpResponseMessage(initialResponseStatusCode) 160new HttpResponseMessage(HttpStatusCode.OK)
PublishToSymbolServerTest.cs (13)
239var response = new HttpResponseMessage(HttpStatusCode.OK) 276new HttpResponseMessage(httpStatus) 280new HttpResponseMessage(httpStatus) 284new HttpResponseMessage(httpStatus) 319new HttpResponseMessage(httpStatus) 323new HttpResponseMessage(httpStatus) 327new HttpResponseMessage(httpStatus) 362new HttpResponseMessage(httpStatus) 366new HttpResponseMessage(HttpStatusCode.OK) 398var responses = new HttpResponseMessage(HttpStatusCode.OK) 427new HttpResponseMessage(httpStatus) 431new HttpResponseMessage(httpStatus) 435new HttpResponseMessage(httpStatus)
Microsoft.DotNet.Helix.Sdk.Tests (16)
FindDotNetCliPackageTests.cs (16)
28ResponseMessage = new HttpResponseMessage(HttpStatusCode.OK) { Content = new StringContent("6.0.102")} 33ResponseMessage = new HttpResponseMessage(HttpStatusCode.NotFound) 38ResponseMessage = new HttpResponseMessage(HttpStatusCode.OK) { Content = new StringContent("6.0.102")} 43ResponseMessage = new HttpResponseMessage(HttpStatusCode.OK) 76ResponseMessage = new HttpResponseMessage(HttpStatusCode.OK) { Content = new StringContent("6.0.102")} 81ResponseMessage = new HttpResponseMessage(HttpStatusCode.OK) 126ResponseMessage = new HttpResponseMessage(HttpStatusCode.OK) { Content = new StringContent("6.0.102")} 132ResponseMessage = new HttpResponseMessage(HttpStatusCode.Forbidden) 179ResponseMessage = new HttpResponseMessage(HttpStatusCode.OK) { Content = new StringContent("6.0.102")} 184ResponseMessage = new HttpResponseMessage(HttpStatusCode.NotFound) 189ResponseMessage = new HttpResponseMessage(HttpStatusCode.OK) { Content = new StringContent("6.0.102")} 194ResponseMessage = new HttpResponseMessage(HttpStatusCode.NotFound) 245ResponseMessage = new HttpResponseMessage(HttpStatusCode.OK) { Content = new StringContent("6.0.102") } 250ResponseMessage = new HttpResponseMessage(HttpStatusCode.NotFound) 255ResponseMessage = new HttpResponseMessage(HttpStatusCode.OK) { Content = new StringContent("6.0.102") } 260ResponseMessage = new HttpResponseMessage(HttpStatusCode.NotFound)
Microsoft.Extensions.Http.Diagnostics.PerformanceTests (2)
NoRemoteCallHandler.cs (1)
37var response = new HttpResponseMessage
NoRemoteCallNotSeekableHandler.cs (1)
40var response = new HttpResponseMessage
Microsoft.Extensions.Http.Diagnostics.Tests (34)
Latency\Internal\HttpClientLatencyLogEnricherTest.cs (2)
45using HttpResponseMessage httpResponseMessage = new(); 65using HttpResponseMessage httpResponseMessage = new();
Logging\HttpClientLoggerTest.cs (14)
55using var httpResponseMessage = new HttpResponseMessage { StatusCode = responseCode }; 146new TestingHandlerStub((_, _) => Task.FromResult(new HttpResponseMessage(HttpStatusCode.OK)))); 193using var httpResponseMessage = new HttpResponseMessage 287using var httpResponseMessage = new HttpResponseMessage 393using var httpResponseMessage = new HttpResponseMessage 489using var httpResponseMessage = new HttpResponseMessage 603using var httpResponseMessage = new HttpResponseMessage 684new TestingHandlerStub((_, _) => Task.FromResult(new HttpResponseMessage(HttpStatusCode.OK)))); 727new TestingHandlerStub((_, _) => Task.FromResult(new HttpResponseMessage(HttpStatusCode.OK)))); 765(_, _) => Task.FromResult(new HttpResponseMessage(HttpStatusCode.OK)))); 873using var httpResponseMessage = new HttpResponseMessage 954Task.FromResult(new HttpResponseMessage((HttpStatusCode)httpStatusCode)))); 983using var httpResponseMessage = new HttpResponseMessage(); 1002using var httpResponseMessage = new HttpResponseMessage();
Logging\HttpHeadersReaderTest.cs (4)
24using var httpResponse = new HttpResponseMessage(); 42using var httpResponse = new HttpResponseMessage(); 145using var httpResponse = new HttpResponseMessage { Content = responseContent }; 178using var httpResponse = new HttpResponseMessage();
Logging\HttpRequestReaderTest.cs (7)
90using var httpResponseMessage = new HttpResponseMessage 150using var httpResponseMessage = new HttpResponseMessage 219using var httpResponseMessage = new HttpResponseMessage 294using var httpResponseMessage = new HttpResponseMessage 424using var httpResponseMessage = new HttpResponseMessage 491using var httpResponseMessage = new HttpResponseMessage 559using var httpResponseMessage = new HttpResponseMessage
Logging\HttpResponseBodyReaderTest.cs (6)
40using var httpResponse = new HttpResponseMessage 58using var httpResponse = new HttpResponseMessage 83using var httpResponse = new HttpResponseMessage 103using var httpResponse = new HttpResponseMessage 127using var httpResponse = new HttpResponseMessage 152using var httpResponse = new HttpResponseMessage
Logging\Internal\NoRemoteCallHandler.cs (1)
31var response = new HttpResponseMessage
Microsoft.Extensions.Http.Polly.Tests (14)
DependencyInjection\PollyHttpClientBuilderExtensionsTest.cs (4)
247(req) => new HttpResponseMessage(statusCode), 248(req) => new HttpResponseMessage(HttpStatusCode.OK), 293(req) => new HttpResponseMessage(HttpStatusCode.OK), 569return Task.FromResult(new HttpResponseMessage(HttpStatusCode.Created));
PolicyHttpMessageHandlerTest.cs (10)
29var expected = new HttpResponseMessage(); 74var expected = new HttpResponseMessage(); 111var firstResponse = new HttpResponseMessage() 116var expected = new HttpResponseMessage(); 161var firstResponse = new HttpResponseMessage() 166var expected = new HttpResponseMessage(); 211var expected = new HttpResponseMessage(); 241var expected = new HttpResponseMessage(); 279var expected = new HttpResponseMessage(); 306var expected = new HttpResponseMessage();
Microsoft.Extensions.Http.Resilience.PerformanceTests (1)
NoRemoteCallHandler.cs (1)
18_response = new HttpResponseMessage
Microsoft.Extensions.Http.Resilience.Tests (21)
Hedging\HedgingTests.cs (1)
334_responses.Enqueue(new HttpResponseMessage(statusCode));
Hedging\HttpClientHedgingResiliencePredicatesTests.cs (1)
42using var response = new HttpResponseMessage(code);
Hedging\StandardHedgingTests.cs (3)
116using var response = new HttpResponseMessage(HttpStatusCode.OK); 361return new HttpResponseMessage(HttpStatusCode.OK); 375return new HttpResponseMessage(HttpStatusCode.OK);
Helpers\TestHandlerStub.cs (1)
17: this((_, _) => Task.FromResult(new HttpResponseMessage(statusCode)))
Internal\RequestMessageSnapshotStrategyTests.cs (1)
29return new ValueTask<HttpResponseMessage>(new HttpResponseMessage());
Internal\RetryAfterHelperTests.cs (4)
19using var response = new HttpResponseMessage(); 31using var response = new HttpResponseMessage(); 44using var response = new HttpResponseMessage(); 58using var response = new HttpResponseMessage();
Polly\HttpCircuitBreakerStrategyOptionsTests.cs (1)
59using var response = new HttpResponseMessage { StatusCode = statusCode };
Polly\HttpClientResiliencePredicatesTests.cs (1)
55var response = new HttpResponseMessage { StatusCode = statusCode };
Polly\HttpRetryStrategyOptionsTests.cs (4)
58var response = new HttpResponseMessage { StatusCode = statusCode }; 83var response = new HttpResponseMessage { StatusCode = statusCode }; 102using var responseMessage = new HttpResponseMessage(); 130using var responseMessage = new HttpResponseMessage
Resilience\HttpClientBuilderExtensionsTests.Standard.cs (1)
245return Task.FromResult(new HttpResponseMessage(HttpStatusCode.InternalServerError));
Resilience\HttpResilienceMetricsEnricherTests.cs (1)
46using var response = new HttpResponseMessage(System.Net.HttpStatusCode.InternalServerError);
Resilience\ResilienceHandlerTest.cs (2)
112return Task.FromResult(new HttpResponseMessage { StatusCode = HttpStatusCode.Created }); 137return Task.FromResult(new HttpResponseMessage { StatusCode = HttpStatusCode.Created });
System.Net.Http (3)
System\Net\Http\SocketsHttpHandler\Http2Stream.cs (1)
137_response = new HttpResponseMessage()
System\Net\Http\SocketsHttpHandler\Http3RequestStream.cs (1)
1039_response = new HttpResponseMessage()
System\Net\Http\SocketsHttpHandler\HttpConnection.cs (1)
663var response = new HttpResponseMessage() { RequestMessage = request, Content = new HttpConnectionResponseContent() };
3684 references to HttpResponseMessage
Aspire.Dashboard.Tests (31)
Integration\FrontendBrowserTokenAuthTests.cs (2)
43var response = await client.GetAsync("/").DefaultTimeout(); 145var response = await client.PostAsync("/api/validatetoken?token=" + requestToken, content: null).DefaultTimeout();
Integration\FrontendOpenIdConnectAuthTests.cs (2)
40var response = await client.GetAsync("/").DefaultTimeout(); 85var response = await client.GetAsync("/").DefaultTimeout();
Integration\OtlpCorsHttpServiceTests.cs (5)
36var responseMessage = await httpClient.SendAsync(preflightRequest).DefaultTimeout(); 60var responseMessage1 = await httpClient.SendAsync(preflightRequest1).DefaultTimeout(); 74var responseMessage2 = await httpClient.SendAsync(preflightRequest2).DefaultTimeout(); 101var responseMessage = await httpClient.SendAsync(preflightRequest).DefaultTimeout(); 129var responseMessage = await httpClient.SendAsync(preflightRequest).DefaultTimeout();
Integration\OtlpHttpServiceTests.cs (11)
47var responseMessage = await httpClient.PostAsync("/v1/logs", content).DefaultTimeout(); 73var responseMessage = await httpClient.PostAsync("/v1/logs", content).DefaultTimeout(); 117var responseMessage = await httpClient.PostAsync("/v1/logs", content).DefaultTimeout(); 145var responseMessage = await httpClient.SendAsync(requestMessage).DefaultTimeout(); 173var responseMessage = await httpClient.SendAsync(requestMessage).DefaultTimeout(); 207var responseMessage = await httpClient.PostAsync("/v1/logs", content).DefaultTimeout(); 237var responseMessage = await client.PostAsync("/v1/logs", content).DefaultTimeout(); 264var responseMessage = await client.SendAsync(requestMessage).DefaultTimeout(); 287var responseMessage = await client.PostAsync("/v1/logs", content).DefaultTimeout(); 316var responseMessage = await client.PostAsync("/v1/traces", content).DefaultTimeout(); 345var responseMessage = await client.PostAsync("/v1/metrics", content).DefaultTimeout();
Integration\ResponseCompressionTests.cs (2)
28var response = await client.SendAsync(request).DefaultTimeout(); 50var response = await client.SendAsync(request).DefaultTimeout();
Integration\StartupTests.cs (3)
299var response = await httpClient.SendAsync(request).DefaultTimeout(); 400var responseMessage = await httpClient.SendAsync(request).DefaultTimeout(); 693var response = await client.GetAsync("/").DefaultTimeout();
Middleware\ValidateTokenMiddlewareTests.cs (6)
22var response = await host.GetTestClient().GetAsync("/login?t=test").DefaultTimeout(); 30var response = await host.GetTestClient().GetAsync("/login?t=test&returnUrl=/test").DefaultTimeout(); 38var response = await host.GetTestClient().GetAsync("/login?t=wrong").DefaultTimeout(); 46var response = await host.GetTestClient().GetAsync("/login?t=wrong&returnUrl=/test").DefaultTimeout(); 54var response = await host.GetTestClient().GetAsync("/login?t=token").DefaultTimeout(); 62var response = await host.GetTestClient().GetAsync("/login?t=token&returnUrl=/test").DefaultTimeout();
Aspire.EndToEnd.Tests (3)
IntegrationServicesTests.cs (1)
33var response = await _integrationServicesFixture.IntegrationServiceA.HttpGetAsync("http", $"/{resourceName}/verify");
tests\Shared\WorkloadTesting\AspireProject.cs (1)
364var res = await Client.Value.GetAsync(dashboardUrl, token);
tests\Shared\WorkloadTesting\ProjectInfo.cs (1)
20public Task<HttpResponseMessage> HttpGetAsync(string bindingName, string path, CancellationToken cancellationToken = default)
Aspire.Hosting (1)
Dcp\DcpKubernetesClient.cs (1)
71var httpResponse = await SendRequest<object?>(url, HttpMethod.Get, customHeaders : null, body: null, cancellationToken).ConfigureAwait(false);
Aspire.Hosting.PostgreSQL.Tests (2)
PostgresFunctionalTests.cs (2)
95var response = await client.GetAsync(path); 178var response = await client.PostAsync("/api/connect", httpContent);
Aspire.Hosting.Redis (2)
RedisBuilderExtensions.cs (2)
287var deleteResponse = await client.SendAsync(deleteRequest, cancellationToken).ConfigureAwait(false); 295var response = await client.PostAsync(apiUrl, content, ctx)
Aspire.Hosting.Redis.Tests (5)
RedisFunctionalTests.cs (5)
85var response = await client.GetAsync(path); 260var response = await client.GetAsync("/api/databases", cts.Token); 287var testConnectionResponse = await client.GetAsync($"/api/databases/test/{db.Id}", cts2.Token); 665var response = await httpClient.GetAsync("/api/settings", ct); 696var response = await client.PatchAsync(apiUrl, jsonContent, ct);
Aspire.Playground.Tests (2)
AppHostTests.cs (2)
96HttpResponseMessage? response = null; 271var response = await client.GetAsync(path);
Aspire.Workload.Tests (2)
tests\Shared\WorkloadTesting\AspireProject.cs (1)
364var res = await Client.Value.GetAsync(dashboardUrl, token);
tests\Shared\WorkloadTesting\ProjectInfo.cs (1)
20public Task<HttpResponseMessage> HttpGetAsync(string bindingName, string path, CancellationToken cancellationToken = default)
AuthSamples.FunctionalTests (42)
ClaimsTransformTests.cs (2)
25var response = await Client.GetAsync("/"); 36var response = await Client.GetAsync("/Home/MyClaims");
CookiesTests.cs (5)
24var response = await Client.GetAsync("/"); 35var response = await Client.GetAsync("/Home/MyClaims"); 58var response = await Client.GetAsync("/Account/Logout"); 72var response = await Client.GetAsync("/Home/MyClaims"); 81var goToSignIn = await Client.GetAsync("/account/login");
CustomAuthorizationFailureResponseTests.cs (2)
24var response = await Client.GetAsync("api/Sample/customPolicyWithCustomForbiddenMessage"); 34var response = await Client.GetAsync("api/Sample/customPolicy");
CustomPolicyProviderTests.cs (13)
28var response = await Client.GetAsync("/"); 39var response = await Client.GetAsync("/Home/MinimumAge10"); 51var signIn = await SignIn(Client, "Dude", DateTime.Now.Subtract(TimeSpan.FromDays(365 * 20)).ToString(DateTimeFormatInfo.InvariantInfo.ShortDatePattern, CultureInfo.InvariantCulture)); 54var response = await Client.GetAsync("/Home/MinimumAge10"); 67var signIn = await SignIn(Client, "Dude", DateTime.Now.Subtract(TimeSpan.FromDays(365 * 5)).ToString(DateTimeFormatInfo.InvariantInfo.ShortDatePattern, CultureInfo.InvariantCulture)); 70var response = await Client.GetAsync("/Home/MinimumAge10"); 82var signIn = await SignIn(Client, "Dude", DateTime.Now.Subtract(TimeSpan.FromDays(365 * 55)).ToString(DateTimeFormatInfo.InvariantInfo.ShortDatePattern, CultureInfo.InvariantCulture)); 85var response = await Client.GetAsync("/Home/MinimumAge50"); 98var signIn = await SignIn(Client, "Dude", DateTime.Now.Subtract(TimeSpan.FromDays(365 * 20)).ToString(DateTimeFormatInfo.InvariantInfo.ShortDatePattern, CultureInfo.InvariantCulture)); 101var response = await Client.GetAsync("/Home/MinimumAge50"); 113var response = await Client.GetAsync("/Home/MinimumAge50"); 121internal static async Task<HttpResponseMessage> SignIn(HttpClient client, string userName, string dob) 123var goToSignIn = await client.GetAsync("/account/signin");
DynamicSchemeTests.cs (4)
26var response = await Client.GetAsync("/"); 37var response = await AddScheme("New1", "NewOne"); 80private async Task<HttpResponseMessage> AddScheme(string name, string message) 82var goToSignIn = await Client.GetAsync("/");
HttpClientExtensions.cs (2)
16public static Task<HttpResponseMessage> SendAsync( 28public static Task<HttpResponseMessage> SendAsync(
IdentityExternalClaimsTests.cs (2)
25var response = await Client.GetAsync("/"); 36var response = await Client.GetAsync("/MyClaims");
PathSchemeSelectionTests.cs (7)
26var response = await Client.GetAsync("/"); 37var response = await Client.GetAsync("/api"); 48var response = await Client.GetAsync("/Home/MyClaims"); 60var response = await Client.GetAsync("/api/Home/MyClaims"); 84var response = await Client.GetAsync("/Account/Logout"); 98var response = await Client.GetAsync("/Home/MyClaims"); 107var goToSignIn = await Client.GetAsync("/account/login");
StaticFilesAuthTests.cs (2)
24var response = await Client.GetAsync("/"); 35var response = await Client.GetAsync(scenario);
TestAssert.cs (3)
67public static Uri IsRedirect(HttpResponseMessage responseMessage) 73public static async Task<IHtmlDocument> IsHtmlDocumentAsync(HttpResponseMessage response) 106internal static void IsOK(HttpResponseMessage download)
BasicWebSite (1)
Services\WeatherForecastService.cs (1)
21var result = await _httpClient.GetAsync("/WeatherData");
Binding.Http.IntegrationTests (7)
BasicHttpBindingTests.4.0.0.cs (2)
118return Task.FromResult((HttpResponseMessage)null); 176return Task.FromResult((HttpResponseMessage)null);
HttpBindingTestHelpers.cs (5)
30public Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> OnSendingAsync { get; set; } 31public Func<HttpResponseMessage, CancellationToken, Task<HttpResponseMessage>> OnSentAsync { get; set; } 45protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 47HttpResponseMessage response;
Binding.ReliableSession.IntegrationTests (7)
NetHttpBindingTests.cs (1)
372return Task.FromResult<HttpResponseMessage>(null);
src\System.Private.ServiceModel\tests\Scenarios\Binding\Http\HttpBindingTestHelpers.cs (5)
30public Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> OnSendingAsync { get; set; } 31public Func<HttpResponseMessage, CancellationToken, Task<HttpResponseMessage>> OnSentAsync { get; set; } 45protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 47HttpResponseMessage response;
WSHttpBindingTests.cs (1)
372return Task.FromResult<HttpResponseMessage>(null);
ClientSample (2)
LoggingMessageHandler.cs (2)
25protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 28var result = await base.SendAsync(request, cancellationToken);
Diagnostics.EFCore.FunctionalTests (12)
DatabaseErrorPageMiddlewareTest.cs (7)
43HttpResponseMessage response = await server.CreateClient().GetAsync("http://localhost/"); 139HttpResponseMessage response = await server.CreateClient().GetAsync("http://localhost/"); 200HttpResponseMessage response = await server.CreateClient().GetAsync("http://localhost/"); 239HttpResponseMessage response = await server.CreateClient().GetAsync("http://localhost/"); 285HttpResponseMessage response = await client.GetAsync("http://localhost/"); 362HttpResponseMessage response = await server.CreateClient().GetAsync("http://localhost/"); 485HttpResponseMessage response = await server.CreateClient().GetAsync("http://localhost/");
MigrationsEndPointMiddlewareTest.cs (5)
40HttpResponseMessage response = await server.CreateClient().GetAsync("http://localhost/"); 125HttpResponseMessage response = await server.CreateClient() 161var response = await server.CreateClient().PostAsync("http://localhost" + MigrationsEndPointOptions.DefaultPath, formData); 193var response = await server.CreateClient().PostAsync("http://localhost" + MigrationsEndPointOptions.DefaultPath, formData); 222var response = await server.CreateClient().PostAsync("http://localhost" + MigrationsEndPointOptions.DefaultPath, formData);
Diagnostics.FunctionalTests (13)
DatabaseErrorPageSampleTest.cs (1)
28var response = await Client.SendAsync(request);
DeveloperExceptionPageSampleTest.cs (2)
29var response = await Client.SendAsync(request); 45var response = await Client.SendAsync(request);
ExceptionHandlerSampleTest.cs (1)
25var response = await Client.SendAsync(request);
MiddlewareAnalysisSampleTest.cs (1)
25var response = await Client.SendAsync(request);
ProblemDetailsExceptionHandlerSampleTest.cs (2)
30var response = await Client.SendAsync(request); 47var response = await Client.SendAsync(request);
StatusCodeSampleTest.cs (5)
30var response = await Client.SendAsync(request); 46var response = await Client.SendAsync(request); 64var response = await Client.SendAsync(request); 85var response = await Client.SendAsync(request); 102var response = await Client.SendAsync(request);
WelcomePageSampleTest.cs (1)
23var response = await Client.SendAsync(request);
dotnet-openapi (3)
HttpClientWrapper.cs (3)
31var response = await _client.GetAsync(url); 44private readonly HttpResponseMessage _response; 46public HttpResponseMessageWrapper(HttpResponseMessage response)
dotnet-svcutil-lib (15)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpChannelFactory.cs (1)
879private HttpResponseMessage _httpResponseMessage;
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpChannelHelpers.cs (2)
112public static HttpResponseMessage ProcessGetResponseWebException(HttpRequestException requestException, HttpRequestMessage request, HttpAbortReason abortReason) 147internal static Exception CreateUnexpectedResponseException(HttpResponseMessage response)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpResponseMessageExtensionMethods.cs (4)
15internal static void CopyPropertiesFromMessage(this HttpResponseMessage httpResponseMessage, Message message) 29internal static bool CreateContentIfNull(this HttpResponseMessage httpResponseMessage) 42internal static void MergeWebHeaderCollection(this HttpResponseMessage responseMessage, WebHeaderCollection headersToMerge) 48internal static WebHeaderCollection ToWebHeaderCollection(this HttpResponseMessage httpResponse)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpResponseMessageHelper.cs (2)
21private readonly HttpResponseMessage _httpResponseMessage; 25public HttpResponseMessageHelper(HttpResponseMessage httpResponseMessage, HttpChannelFactory<IRequestChannel> factory)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpResponseMessageProperty.cs (6)
31internal HttpResponseMessageProperty(HttpResponseMessage httpResponseMessage) 153public HttpResponseMessage HttpResponseMessage 166internal static HttpResponseMessage GetHttpResponseMessageFromMessage(Message message) 168HttpResponseMessage httpResponseMessage = null; 291public HttpResponseMessageBackedProperty(HttpResponseMessage httpResponseMessage) 298public HttpResponseMessage HttpResponseMessage { get; private set; }
GenerateRulesMissingDocumentation (1)
Program.cs (1)
114using var response = await httpClient.SendAsync(request).ConfigureAwait(false);
HeaderPropagationSample (1)
Startup.cs (1)
77var response = await client.GetAsync(uri);
HttpClientApp (1)
Program.cs (1)
22var response = await client.GetAsync("https://localhost:5003");
HttpStress (13)
Program.cs (13)
99void ValidateResponse(HttpResponseMessage m, Version expectedVersion) 175using (HttpResponseMessage m = await ctx.HttpClient.SendAsync(req)) 204using (HttpResponseMessage m = await ctx.HttpClient.SendAsync(req)) 218Task<HttpResponseMessage> t = ctx.HttpClient.SendAsync(req, HttpCompletionOption.ResponseHeadersRead, cts.Token); 223using (HttpResponseMessage m = await t) 244using (HttpResponseMessage m = await ctx.HttpClient.SendAsync(req)) 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); 311using (HttpResponseMessage m = await t) 326using (HttpResponseMessage m = await ctx.HttpClient.SendAsync(req)) 348using (HttpResponseMessage m = await ctx.HttpClient.SendAsync(req))
IIS.FunctionalTests (96)
Http2TrailersResetTests.cs (16)
49var response = await SendRequestAsync(Fixture.Client.BaseAddress.ToString() + "ResponseTrailers_HTTP2_TrailersAvailable"); 60var response = await SendRequestAsync(Fixture.Client.BaseAddress.ToString() + "ResponseTrailers_ProhibitedTrailers_Blocked"); 71var response = await SendRequestAsync(Fixture.Client.BaseAddress.ToString() + "ResponseTrailers_NoBody_TrailersSent"); 83var response = await SendRequestAsync(Fixture.Client.BaseAddress.ToString() + "ResponseTrailers_WithBody_TrailersSent"); 98var response = await SendRequestAsync(Fixture.Client.BaseAddress.ToString() + "ResponseTrailers_WithContentLengthBody_TrailersSent"); 113var response = await SendRequestAsync(Fixture.Client.BaseAddress.ToString() + "ResponseTrailers_WithTrailersBeforeContentLengthBody_TrailersSent"); 131var response = await SendRequestAsync(Fixture.Client.BaseAddress.ToString() + "ResponseTrailers_WithContentLengthBodyAndDeclared_TrailersSent"); 148var response = await SendRequestAsync(Fixture.Client.BaseAddress.ToString() + "ResponseTrailers_MultipleValues_SentAsSeparateHeaders"); 163var response = await SendRequestAsync(Fixture.Client.BaseAddress.ToString() + "ResponseTrailers_CompleteAsyncNoBody_TrailersSent"); 169var response2 = await SendRequestAsync(Fixture.Client.BaseAddress.ToString() + "ResponseTrailers_CompleteAsyncNoBody_TrailersSent_Completed"); 179var response = await SendRequestAsync(Fixture.Client.BaseAddress.ToString() + "ResponseTrailers_CompleteAsyncWithBody_TrailersSent"); 186var response2 = await SendRequestAsync(Fixture.Client.BaseAddress.ToString() + "ResponseTrailers_CompleteAsyncWithBody_TrailersSent_Completed"); 237var response = await client.GetAsync(Fixture.Client.BaseAddress + "/Reset_BeforeResponse_Resets_Complete"); 298var response = await client.GetAsync(Fixture.Client.BaseAddress + "/Reset_BeforeResponse_Zero_Resets_Complete"); 322var response = await client.GetAsync(Fixture.Client.BaseAddress + "/Reset_AfterResponseHeaders_Resets_Complete"); 512private async Task<HttpResponseMessage> SendRequestAsync(string uri, bool http2 = true)
Http3Tests.cs (7)
50var response = await client.GetAsync(Fixture.Client.BaseAddress.ToString() + "Http3_Direct"); 70var response1 = await client.SendAsync(request); 76var response3 = await client.GetAsync(address); 92var response2 = await client.GetAsync(address); 109var response = await client.GetAsync(address); 136var response = await client.GetAsync(address, HttpCompletionOption.ResponseHeadersRead); 153var response = await client.GetAsync(address, HttpCompletionOption.ResponseHeadersRead);
src\Servers\IIS\IIS\test\Common.FunctionalTests\AspNetCorePortTests.cs (2)
95var response = await deploymentResult.HttpClient.GetAsync("/ServerAddresses"); 111var response = await deploymentResult.HttpClient.GetAsync("/Shutdown");
src\Servers\IIS\IIS\test\Common.FunctionalTests\BasicAuthTests.cs (1)
64var response = await deploymentResult.HttpClient.SendAsync(request);
src\Servers\IIS\IIS\test\Common.FunctionalTests\CompressionTests.cs (1)
142var response = await client.PostAsync("ReadAndWriteEchoLines", new StringContent(messages));
src\Servers\IIS\IIS\test\Common.FunctionalTests\GlobalVersionTests.cs (7)
52var response = await deploymentResult.HttpClient.GetAsync(_helloWorldRequest); 76var response = await deploymentResult.HttpClient.GetAsync(_helloWorldRequest); 99var response = await deploymentResult.HttpClient.GetAsync(_helloWorldRequest); 122var response = await deploymentResult.HttpClient.GetAsync(_helloWorldRequest); 146var response = await deploymentResult.HttpClient.GetAsync("CheckRequestHandlerVersion"); 167var response = await deploymentResult.HttpClient.GetAsync("CheckRequestHandlerVersion"); 199var response = await deploymentResult.HttpClient.GetAsync("HelloWorld");
src\Servers\IIS\IIS\test\Common.FunctionalTests\Http2Tests.cs (2)
320var response = await SendRequestAsync(Fixture.Client.BaseAddress.ToString() + "ResponseTrailers_HTTP1_TrailersNotAvailable", http2: false); 389private async Task<HttpResponseMessage> SendRequestAsync(string uri, bool http2 = true)
src\Servers\IIS\IIS\test\Common.FunctionalTests\HttpsTests.cs (1)
89var response = await client.GetAsync("GetClientCert");
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (8)
29var response = await deploymentResult.HttpClient.RetryRequestAsync(path, r => r.IsSuccessStatusCode); 41public static async Task StressLoad(HttpClient httpClient, string path, Action<HttpResponseMessage> action) 53var response = await connection.GetAsync(path); 105public static Task<HttpResponseMessage> RetryRequestAsync(this HttpClient client, string uri, Func<HttpResponseMessage, bool> predicate) 110public static async Task<HttpResponseMessage> RetryRequestAsync(this HttpClient client, string uri, Func<HttpResponseMessage, Task<bool>> predicate) 112HttpResponseMessage response = await client.GetAsync(uri);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISFunctionalTestBase.cs (2)
53var response = await deploymentResult.HttpClient.RetryRequestAsync("HelloWorld", r => r.StatusCode == HttpStatusCode.ServiceUnavailable); 68var response = await deploymentResult.HttpClient.RetryRequestAsync("HelloWorld", r => r.IsSuccessStatusCode);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Inprocess\HttpSysRequestInfoTests.cs (1)
35var response = await deploymentResult.HttpClient.GetAsync("/HttpSysRequestTimingInfo");
src\Servers\IIS\IIS\test\Common.FunctionalTests\Inprocess\MaxRequestBodySizeTests.cs (5)
44var result = await deploymentResult.HttpClient.PostAsync("/ReadRequestBody", new StringContent("test")); 64var result = await deploymentResult.HttpClient.PostAsync("/ReadRequestBody", new StringContent("test")); 87var result = await deploymentResult.HttpClient.PostAsync("/ReadRequestBodyLarger", new StringContent(new string('a', 100000000))); 108var result = await deploymentResult.HttpClient.PostAsync("/ReadRequestBodyLarger", new StringContent(new string('a', 10000))); 154var result = await deploymentResult.HttpClient.PostAsync("/IncreaseRequestLimit", new StringContent("1"));
src\Servers\IIS\IIS\test\Common.FunctionalTests\Latin1Tests.cs (2)
51var result = await client.SendAsync(requestMessage); 69var result = await client.SendAsync(requestMessage);
src\Servers\IIS\IIS\test\Common.FunctionalTests\LoggingTests.cs (5)
169var response = await deploymentResult.HttpClient.GetAsync("/"); 211var response = await deploymentResult.HttpClient.GetAsync(path); 245var response = await deploymentResult.HttpClient.GetAsync("Test"); 261var response = await deploymentResult.HttpClient.GetAsync("Test"); 275var response = await deploymentResult.HttpClient.GetAsync("Test");
src\Servers\IIS\IIS\test\Common.FunctionalTests\MaxRequestBodySizeTests.cs (5)
45var result = await deploymentResult.HttpClient.PostAsync("/ReadRequestBody", new StringContent("test")); 65var result = await deploymentResult.HttpClient.PostAsync("/ReadRequestBody", new StringContent("test")); 88var result = await deploymentResult.HttpClient.PostAsync("/ReadRequestBodyLarger", new StringContent(new string('a', 100000000))); 109var result = await deploymentResult.HttpClient.PostAsync("/ReadRequestBodyLarger", new StringContent(new string('a', 10000))); 155var result = await deploymentResult.HttpClient.PostAsync("/IncreaseRequestLimit", new StringContent("1"));
src\Servers\IIS\IIS\test\Common.FunctionalTests\MultiApplicationTests.cs (4)
59var result1 = await result.HttpClient.GetAsync("/app1/HelloWorld"); 60var result2 = await result.HttpClient.GetAsync("/app2/HelloWorld"); 86var result1 = await result.HttpClient.GetAsync("/app1/HelloWorld"); 87var result2 = await result.HttpClient.GetAsync("/app2/HelloWorld");
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestResponseTests.cs (19)
131var response = await _fixture.Client.SendAsync(request); 149var response = await _fixture.Client.SendAsync(request); 165var response = await _fixture.Client.PostAsync("ReadAndWriteSynchronously", content); 177var response = await _fixture.Client.PostAsync("ReadAndWriteEcho", content); 188var response = await _fixture.Client.PostAsync("ReadAndWriteCopyToAsync", content); 199var response = await _fixture.Client.PostAsync("ReadAndWriteEchoTwice", content); 210var response = await _fixture.Client.PostAsync("SetHeaderFromBody", content); 399var response = await _fixture.Client.GetAsync("/CompleteAsync"); 402var response2 = await _fixture.Client.GetAsync("/CompleteAsync_Completed"); 453var result = await _fixture.Client.PostAsync($"/TestReadOffsetWorks", new StringContent("Hello World")); 483var result = await _fixture.Client.PostAsync($"/TestValidReadOperations{operation}", new StringContent("hello")); 509var result = await _fixture.Client.PostAsync($"/TestValidWriteOperations/NullBufferPost", new StringContent("hello")); 516var response = await _fixture.Client.GetAsync("ResponseEmptyHeaders"); 525var response = await _fixture.Client.GetAsync("ResponseHeaders"); 545var response = await _fixture.Client.GetAsync("Throw"); 568var response = await _fixture.Client.GetAsync($"SetCustomErorCode?code={code}&reason={reason}&writeBody={body != null}&body={body}"); 583var response = await _fixture.Client.SendAsync(request); 591var response = await _fixture.Client.GetAsync("OverrideServer"); 690var response = await _fixture.Client.GetAsync("HelloWorld");
src\Servers\IIS\IIS\test\Common.FunctionalTests\WebSocketTests.cs (2)
44using var response = await client.PostAsync(Fixture.DeploymentResult.ApplicationBaseUri + "WebSocketNotUpgradable", new StringContent("Hello World")); 59using var response = await client.PostAsync(Fixture.DeploymentResult.ApplicationBaseUri + "WebSocketUpgradable", new StringContent(""));
src\Servers\IIS\IIS\test\Common.FunctionalTests\WindowsAuthTests.cs (1)
55var response = await client.GetAsync("/Auth");
src\Servers\IIS\IIS\test\IIS.Shared.FunctionalTests\StdOutRedirectionTests.cs (5)
45var response = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 69var response = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 99var response = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 125var response = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 152var response = await deploymentResult.HttpClient.GetAsync("/HelloWorld");
IIS.LongTests (53)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (8)
29var response = await deploymentResult.HttpClient.RetryRequestAsync(path, r => r.IsSuccessStatusCode); 41public static async Task StressLoad(HttpClient httpClient, string path, Action<HttpResponseMessage> action) 53var response = await connection.GetAsync(path); 105public static Task<HttpResponseMessage> RetryRequestAsync(this HttpClient client, string uri, Func<HttpResponseMessage, bool> predicate) 110public static async Task<HttpResponseMessage> RetryRequestAsync(this HttpClient client, string uri, Func<HttpResponseMessage, Task<bool>> predicate) 112HttpResponseMessage response = await client.GetAsync(uri);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISFunctionalTestBase.cs (2)
53var response = await deploymentResult.HttpClient.RetryRequestAsync("HelloWorld", r => r.StatusCode == HttpStatusCode.ServiceUnavailable); 68var response = await deploymentResult.HttpClient.RetryRequestAsync("HelloWorld", r => r.IsSuccessStatusCode);
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (10)
144var result = await deploymentResult.HttpClient.GetAsync("/"); 163var result = await deploymentResult.HttpClient.GetAsync("/"); 181var result = await deploymentResult.HttpClient.GetAsync("/"); 201var result = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 277var result = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 288using var res = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 314var result = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 325using var res = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 614var response = await deploymentResult.HttpClient.GetAsync("/Abort").TimeoutAfter(TimeoutExtensions.DefaultTimeoutValue); 641var response = await deploymentResult.HttpClient.GetAsync("/Abort").TimeoutAfter(TimeoutExtensions.DefaultTimeoutValue);
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (33)
68var response = await deploymentResult.HttpClient.GetAsync("HelloWorld"); 177var response = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 228var response = await deploymentResult.HttpClient.GetAsync("/"); 246var response = await deploymentResult.HttpClient.GetAsync("/"); 263var response = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 427var response = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 479var response = await deploymentResult.HttpClient.GetAsync("/"); 512var response = await deploymentResult.HttpClient.GetAsync("/"); 537var response = await deploymentResult.HttpClient.GetAsync("HelloWorld"); 559var result = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 772var result = await deploymentResult.HttpClient.GetAsync("/"); 796var result = await deploymentResult.HttpClient.GetAsync("/"); 819var result = await deploymentResult.HttpClient.GetAsync("/"); 844var result = await deploymentResult.HttpClient.GetAsync("/"); 866var result = await deploymentResult.HttpClient.GetAsync("/"); 887var result = await deploymentResult.HttpClient.GetAsync("/StartupHook"); 905var result = await deploymentResult.HttpClient.GetAsync("/StartupHook"); 918var result = await deploymentResult.HttpClient.GetAsync("/StackSize"); 930var result = await deploymentResult.HttpClient.GetAsync("/StackSizeLarge"); 974var response = await deploymentResult.HttpClient.GetAsync("/OnCompletedThrows"); 1060var response = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 1073var response = await DeployAppWithStartupFailure(deploymentParameters); 1092var response = await DeployAppWithStartupFailure(deploymentParameters); 1115var response = await deploymentResult.HttpClient.GetAsync("HelloWorld"); 1138var response = await deploymentResult.HttpClient.GetAsync("HelloWorld"); 1384var response = await client.GetAsync("/ANCM_HTTPS_PORT"); 1389var response = await client.GetAsync("/ANCM_HTTPS_PORT"); 1436var response = await deploymentResult.HttpClient.GetAsync("ConnectionClose"); 1486private static async Task AssertLink(HttpResponseMessage response) 1491private async Task<HttpResponseMessage> DeployAppWithStartupFailure(IISDeploymentParameters deploymentParameters) 1505var response = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 1574HttpResponseMessage response = null; 1589HttpResponseMessage response = null;
IIS.Microbenchmarks (1)
StartupTimeBenchmark.cs (1)
50var response = await _client.GetAsync("");
IIS.NewHandler.FunctionalTests (54)
NewHandlerTests.cs (1)
27var response = await result.HttpClient.GetAsync("/HelloWorld");
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (8)
29var response = await deploymentResult.HttpClient.RetryRequestAsync(path, r => r.IsSuccessStatusCode); 41public static async Task StressLoad(HttpClient httpClient, string path, Action<HttpResponseMessage> action) 53var response = await connection.GetAsync(path); 105public static Task<HttpResponseMessage> RetryRequestAsync(this HttpClient client, string uri, Func<HttpResponseMessage, bool> predicate) 110public static async Task<HttpResponseMessage> RetryRequestAsync(this HttpClient client, string uri, Func<HttpResponseMessage, Task<bool>> predicate) 112HttpResponseMessage response = await client.GetAsync(uri);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISFunctionalTestBase.cs (2)
53var response = await deploymentResult.HttpClient.RetryRequestAsync("HelloWorld", r => r.StatusCode == HttpStatusCode.ServiceUnavailable); 68var response = await deploymentResult.HttpClient.RetryRequestAsync("HelloWorld", r => r.IsSuccessStatusCode);
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (10)
144var result = await deploymentResult.HttpClient.GetAsync("/"); 163var result = await deploymentResult.HttpClient.GetAsync("/"); 181var result = await deploymentResult.HttpClient.GetAsync("/"); 201var result = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 277var result = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 288using var res = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 314var result = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 325using var res = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 614var response = await deploymentResult.HttpClient.GetAsync("/Abort").TimeoutAfter(TimeoutExtensions.DefaultTimeoutValue); 641var response = await deploymentResult.HttpClient.GetAsync("/Abort").TimeoutAfter(TimeoutExtensions.DefaultTimeoutValue);
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (33)
68var response = await deploymentResult.HttpClient.GetAsync("HelloWorld"); 177var response = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 228var response = await deploymentResult.HttpClient.GetAsync("/"); 246var response = await deploymentResult.HttpClient.GetAsync("/"); 263var response = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 427var response = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 479var response = await deploymentResult.HttpClient.GetAsync("/"); 512var response = await deploymentResult.HttpClient.GetAsync("/"); 537var response = await deploymentResult.HttpClient.GetAsync("HelloWorld"); 559var result = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 772var result = await deploymentResult.HttpClient.GetAsync("/"); 796var result = await deploymentResult.HttpClient.GetAsync("/"); 819var result = await deploymentResult.HttpClient.GetAsync("/"); 844var result = await deploymentResult.HttpClient.GetAsync("/"); 866var result = await deploymentResult.HttpClient.GetAsync("/"); 887var result = await deploymentResult.HttpClient.GetAsync("/StartupHook"); 905var result = await deploymentResult.HttpClient.GetAsync("/StartupHook"); 918var result = await deploymentResult.HttpClient.GetAsync("/StackSize"); 930var result = await deploymentResult.HttpClient.GetAsync("/StackSizeLarge"); 974var response = await deploymentResult.HttpClient.GetAsync("/OnCompletedThrows"); 1060var response = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 1073var response = await DeployAppWithStartupFailure(deploymentParameters); 1092var response = await DeployAppWithStartupFailure(deploymentParameters); 1115var response = await deploymentResult.HttpClient.GetAsync("HelloWorld"); 1138var response = await deploymentResult.HttpClient.GetAsync("HelloWorld"); 1384var response = await client.GetAsync("/ANCM_HTTPS_PORT"); 1389var response = await client.GetAsync("/ANCM_HTTPS_PORT"); 1436var response = await deploymentResult.HttpClient.GetAsync("ConnectionClose"); 1486private static async Task AssertLink(HttpResponseMessage response) 1491private async Task<HttpResponseMessage> DeployAppWithStartupFailure(IISDeploymentParameters deploymentParameters) 1505var response = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 1574HttpResponseMessage response = null; 1589HttpResponseMessage response = null;
IIS.NewShim.FunctionalTests (54)
NewShimTests.cs (1)
25var response = await result.HttpClient.GetAsync("/HelloWorld");
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (8)
29var response = await deploymentResult.HttpClient.RetryRequestAsync(path, r => r.IsSuccessStatusCode); 41public static async Task StressLoad(HttpClient httpClient, string path, Action<HttpResponseMessage> action) 53var response = await connection.GetAsync(path); 105public static Task<HttpResponseMessage> RetryRequestAsync(this HttpClient client, string uri, Func<HttpResponseMessage, bool> predicate) 110public static async Task<HttpResponseMessage> RetryRequestAsync(this HttpClient client, string uri, Func<HttpResponseMessage, Task<bool>> predicate) 112HttpResponseMessage response = await client.GetAsync(uri);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISFunctionalTestBase.cs (2)
53var response = await deploymentResult.HttpClient.RetryRequestAsync("HelloWorld", r => r.StatusCode == HttpStatusCode.ServiceUnavailable); 68var response = await deploymentResult.HttpClient.RetryRequestAsync("HelloWorld", r => r.IsSuccessStatusCode);
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (10)
144var result = await deploymentResult.HttpClient.GetAsync("/"); 163var result = await deploymentResult.HttpClient.GetAsync("/"); 181var result = await deploymentResult.HttpClient.GetAsync("/"); 201var result = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 277var result = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 288using var res = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 314var result = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 325using var res = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 614var response = await deploymentResult.HttpClient.GetAsync("/Abort").TimeoutAfter(TimeoutExtensions.DefaultTimeoutValue); 641var response = await deploymentResult.HttpClient.GetAsync("/Abort").TimeoutAfter(TimeoutExtensions.DefaultTimeoutValue);
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (33)
68var response = await deploymentResult.HttpClient.GetAsync("HelloWorld"); 177var response = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 228var response = await deploymentResult.HttpClient.GetAsync("/"); 246var response = await deploymentResult.HttpClient.GetAsync("/"); 263var response = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 427var response = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 479var response = await deploymentResult.HttpClient.GetAsync("/"); 512var response = await deploymentResult.HttpClient.GetAsync("/"); 537var response = await deploymentResult.HttpClient.GetAsync("HelloWorld"); 559var result = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 772var result = await deploymentResult.HttpClient.GetAsync("/"); 796var result = await deploymentResult.HttpClient.GetAsync("/"); 819var result = await deploymentResult.HttpClient.GetAsync("/"); 844var result = await deploymentResult.HttpClient.GetAsync("/"); 866var result = await deploymentResult.HttpClient.GetAsync("/"); 887var result = await deploymentResult.HttpClient.GetAsync("/StartupHook"); 905var result = await deploymentResult.HttpClient.GetAsync("/StartupHook"); 918var result = await deploymentResult.HttpClient.GetAsync("/StackSize"); 930var result = await deploymentResult.HttpClient.GetAsync("/StackSizeLarge"); 974var response = await deploymentResult.HttpClient.GetAsync("/OnCompletedThrows"); 1060var response = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 1073var response = await DeployAppWithStartupFailure(deploymentParameters); 1092var response = await DeployAppWithStartupFailure(deploymentParameters); 1115var response = await deploymentResult.HttpClient.GetAsync("HelloWorld"); 1138var response = await deploymentResult.HttpClient.GetAsync("HelloWorld"); 1384var response = await client.GetAsync("/ANCM_HTTPS_PORT"); 1389var response = await client.GetAsync("/ANCM_HTTPS_PORT"); 1436var response = await deploymentResult.HttpClient.GetAsync("ConnectionClose"); 1486private static async Task AssertLink(HttpResponseMessage response) 1491private async Task<HttpResponseMessage> DeployAppWithStartupFailure(IISDeploymentParameters deploymentParameters) 1505var response = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 1574HttpResponseMessage response = null; 1589HttpResponseMessage response = null;
IIS.ShadowCopy.Tests (20)
ShadowCopyTests.cs (10)
26var response = await deploymentResult.HttpClient.GetAsync("Wow!"); 52var response = await deploymentResult.HttpClient.GetAsync("Wow!"); 83var response = await deploymentResult.HttpClient.GetAsync("Wow!"); 118var response = await deploymentResult.HttpClient.GetAsync("Wow!"); 154var response = await deploymentResult.HttpClient.GetAsync("Wow!"); 183var response = await deploymentResult.HttpClient.GetAsync("Wow!"); 210var response = await deploymentResult.HttpClient.GetAsync("Wow!"); 252var response = await deploymentResult.HttpClient.GetAsync("Wow!"); 294var response = await deploymentResult.HttpClient.GetAsync("Wow!"); 324var response = await deploymentResult.HttpClient.GetAsync("Wow!");
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (8)
29var response = await deploymentResult.HttpClient.RetryRequestAsync(path, r => r.IsSuccessStatusCode); 41public static async Task StressLoad(HttpClient httpClient, string path, Action<HttpResponseMessage> action) 53var response = await connection.GetAsync(path); 105public static Task<HttpResponseMessage> RetryRequestAsync(this HttpClient client, string uri, Func<HttpResponseMessage, bool> predicate) 110public static async Task<HttpResponseMessage> RetryRequestAsync(this HttpClient client, string uri, Func<HttpResponseMessage, Task<bool>> predicate) 112HttpResponseMessage response = await client.GetAsync(uri);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISFunctionalTestBase.cs (2)
53var response = await deploymentResult.HttpClient.RetryRequestAsync("HelloWorld", r => r.StatusCode == HttpStatusCode.ServiceUnavailable); 68var response = await deploymentResult.HttpClient.RetryRequestAsync("HelloWorld", r => r.IsSuccessStatusCode);
IIS.Tests (2)
ResponseBodySizeTests.cs (1)
27var response = await testServer.HttpClient.GetAsync("/");
TestServerTest.cs (1)
30var result = await testServer.HttpClient.GetAsync(expectedPath);
IISExpress.FunctionalTests (118)
InProcess\AuthenticationTests.cs (1)
31var response = await deploymentResult.HttpClient.GetAsync("/AuthenticationAnonymous");
InProcess\IISExpressShutdownTests.cs (2)
84var response = await result.HttpClient.GetAsync("/HelloWorld"); 96var response = await result.HttpClient.GetAsync("/HelloWorld");
OutOfProcess\MultipleAppTests.cs (2)
45var requestTasks = new List<Task<HttpResponseMessage>>(); 54var response = await requestTask;
OutOfProcess\NtlmAuthentationTest.cs (1)
45var response = await result.HttpClient.GetAsync("/HelloWorld");
src\Servers\IIS\IIS\test\Common.FunctionalTests\AspNetCorePortTests.cs (2)
95var response = await deploymentResult.HttpClient.GetAsync("/ServerAddresses"); 111var response = await deploymentResult.HttpClient.GetAsync("/Shutdown");
src\Servers\IIS\IIS\test\Common.FunctionalTests\BasicAuthTests.cs (1)
64var response = await deploymentResult.HttpClient.SendAsync(request);
src\Servers\IIS\IIS\test\Common.FunctionalTests\CompressionTests.cs (1)
142var response = await client.PostAsync("ReadAndWriteEchoLines", new StringContent(messages));
src\Servers\IIS\IIS\test\Common.FunctionalTests\GlobalVersionTests.cs (7)
52var response = await deploymentResult.HttpClient.GetAsync(_helloWorldRequest); 76var response = await deploymentResult.HttpClient.GetAsync(_helloWorldRequest); 99var response = await deploymentResult.HttpClient.GetAsync(_helloWorldRequest); 122var response = await deploymentResult.HttpClient.GetAsync(_helloWorldRequest); 146var response = await deploymentResult.HttpClient.GetAsync("CheckRequestHandlerVersion"); 167var response = await deploymentResult.HttpClient.GetAsync("CheckRequestHandlerVersion"); 199var response = await deploymentResult.HttpClient.GetAsync("HelloWorld");
src\Servers\IIS\IIS\test\Common.FunctionalTests\Http2Tests.cs (2)
320var response = await SendRequestAsync(Fixture.Client.BaseAddress.ToString() + "ResponseTrailers_HTTP1_TrailersNotAvailable", http2: false); 389private async Task<HttpResponseMessage> SendRequestAsync(string uri, bool http2 = true)
src\Servers\IIS\IIS\test\Common.FunctionalTests\HttpsTests.cs (1)
89var response = await client.GetAsync("GetClientCert");
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (8)
29var response = await deploymentResult.HttpClient.RetryRequestAsync(path, r => r.IsSuccessStatusCode); 41public static async Task StressLoad(HttpClient httpClient, string path, Action<HttpResponseMessage> action) 53var response = await connection.GetAsync(path); 105public static Task<HttpResponseMessage> RetryRequestAsync(this HttpClient client, string uri, Func<HttpResponseMessage, bool> predicate) 110public static async Task<HttpResponseMessage> RetryRequestAsync(this HttpClient client, string uri, Func<HttpResponseMessage, Task<bool>> predicate) 112HttpResponseMessage response = await client.GetAsync(uri);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISFunctionalTestBase.cs (2)
53var response = await deploymentResult.HttpClient.RetryRequestAsync("HelloWorld", r => r.StatusCode == HttpStatusCode.ServiceUnavailable); 68var response = await deploymentResult.HttpClient.RetryRequestAsync("HelloWorld", r => r.IsSuccessStatusCode);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Inprocess\HttpSysRequestInfoTests.cs (1)
35var response = await deploymentResult.HttpClient.GetAsync("/HttpSysRequestTimingInfo");
src\Servers\IIS\IIS\test\Common.FunctionalTests\Inprocess\MaxRequestBodySizeTests.cs (5)
44var result = await deploymentResult.HttpClient.PostAsync("/ReadRequestBody", new StringContent("test")); 64var result = await deploymentResult.HttpClient.PostAsync("/ReadRequestBody", new StringContent("test")); 87var result = await deploymentResult.HttpClient.PostAsync("/ReadRequestBodyLarger", new StringContent(new string('a', 100000000))); 108var result = await deploymentResult.HttpClient.PostAsync("/ReadRequestBodyLarger", new StringContent(new string('a', 10000))); 154var result = await deploymentResult.HttpClient.PostAsync("/IncreaseRequestLimit", new StringContent("1"));
src\Servers\IIS\IIS\test\Common.FunctionalTests\Latin1Tests.cs (2)
51var result = await client.SendAsync(requestMessage); 69var result = await client.SendAsync(requestMessage);
src\Servers\IIS\IIS\test\Common.FunctionalTests\LoggingTests.cs (5)
169var response = await deploymentResult.HttpClient.GetAsync("/"); 211var response = await deploymentResult.HttpClient.GetAsync(path); 245var response = await deploymentResult.HttpClient.GetAsync("Test"); 261var response = await deploymentResult.HttpClient.GetAsync("Test"); 275var response = await deploymentResult.HttpClient.GetAsync("Test");
src\Servers\IIS\IIS\test\Common.FunctionalTests\MaxRequestBodySizeTests.cs (5)
45var result = await deploymentResult.HttpClient.PostAsync("/ReadRequestBody", new StringContent("test")); 65var result = await deploymentResult.HttpClient.PostAsync("/ReadRequestBody", new StringContent("test")); 88var result = await deploymentResult.HttpClient.PostAsync("/ReadRequestBodyLarger", new StringContent(new string('a', 100000000))); 109var result = await deploymentResult.HttpClient.PostAsync("/ReadRequestBodyLarger", new StringContent(new string('a', 10000))); 155var result = await deploymentResult.HttpClient.PostAsync("/IncreaseRequestLimit", new StringContent("1"));
src\Servers\IIS\IIS\test\Common.FunctionalTests\MultiApplicationTests.cs (4)
59var result1 = await result.HttpClient.GetAsync("/app1/HelloWorld"); 60var result2 = await result.HttpClient.GetAsync("/app2/HelloWorld"); 86var result1 = await result.HttpClient.GetAsync("/app1/HelloWorld"); 87var result2 = await result.HttpClient.GetAsync("/app2/HelloWorld");
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestResponseTests.cs (19)
131var response = await _fixture.Client.SendAsync(request); 149var response = await _fixture.Client.SendAsync(request); 165var response = await _fixture.Client.PostAsync("ReadAndWriteSynchronously", content); 177var response = await _fixture.Client.PostAsync("ReadAndWriteEcho", content); 188var response = await _fixture.Client.PostAsync("ReadAndWriteCopyToAsync", content); 199var response = await _fixture.Client.PostAsync("ReadAndWriteEchoTwice", content); 210var response = await _fixture.Client.PostAsync("SetHeaderFromBody", content); 399var response = await _fixture.Client.GetAsync("/CompleteAsync"); 402var response2 = await _fixture.Client.GetAsync("/CompleteAsync_Completed"); 453var result = await _fixture.Client.PostAsync($"/TestReadOffsetWorks", new StringContent("Hello World")); 483var result = await _fixture.Client.PostAsync($"/TestValidReadOperations{operation}", new StringContent("hello")); 509var result = await _fixture.Client.PostAsync($"/TestValidWriteOperations/NullBufferPost", new StringContent("hello")); 516var response = await _fixture.Client.GetAsync("ResponseEmptyHeaders"); 525var response = await _fixture.Client.GetAsync("ResponseHeaders"); 545var response = await _fixture.Client.GetAsync("Throw"); 568var response = await _fixture.Client.GetAsync($"SetCustomErorCode?code={code}&reason={reason}&writeBody={body != null}&body={body}"); 583var response = await _fixture.Client.SendAsync(request); 591var response = await _fixture.Client.GetAsync("OverrideServer"); 690var response = await _fixture.Client.GetAsync("HelloWorld");
src\Servers\IIS\IIS\test\Common.FunctionalTests\WebSocketTests.cs (2)
44using var response = await client.PostAsync(Fixture.DeploymentResult.ApplicationBaseUri + "WebSocketNotUpgradable", new StringContent("Hello World")); 59using var response = await client.PostAsync(Fixture.DeploymentResult.ApplicationBaseUri + "WebSocketUpgradable", new StringContent(""));
src\Servers\IIS\IIS\test\Common.FunctionalTests\WindowsAuthTests.cs (1)
55var response = await client.GetAsync("/Auth");
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (10)
144var result = await deploymentResult.HttpClient.GetAsync("/"); 163var result = await deploymentResult.HttpClient.GetAsync("/"); 181var result = await deploymentResult.HttpClient.GetAsync("/"); 201var result = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 277var result = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 288using var res = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 314var result = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 325using var res = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 614var response = await deploymentResult.HttpClient.GetAsync("/Abort").TimeoutAfter(TimeoutExtensions.DefaultTimeoutValue); 641var response = await deploymentResult.HttpClient.GetAsync("/Abort").TimeoutAfter(TimeoutExtensions.DefaultTimeoutValue);
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (33)
68var response = await deploymentResult.HttpClient.GetAsync("HelloWorld"); 177var response = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 228var response = await deploymentResult.HttpClient.GetAsync("/"); 246var response = await deploymentResult.HttpClient.GetAsync("/"); 263var response = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 427var response = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 479var response = await deploymentResult.HttpClient.GetAsync("/"); 512var response = await deploymentResult.HttpClient.GetAsync("/"); 537var response = await deploymentResult.HttpClient.GetAsync("HelloWorld"); 559var result = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 772var result = await deploymentResult.HttpClient.GetAsync("/"); 796var result = await deploymentResult.HttpClient.GetAsync("/"); 819var result = await deploymentResult.HttpClient.GetAsync("/"); 844var result = await deploymentResult.HttpClient.GetAsync("/"); 866var result = await deploymentResult.HttpClient.GetAsync("/"); 887var result = await deploymentResult.HttpClient.GetAsync("/StartupHook"); 905var result = await deploymentResult.HttpClient.GetAsync("/StartupHook"); 918var result = await deploymentResult.HttpClient.GetAsync("/StackSize"); 930var result = await deploymentResult.HttpClient.GetAsync("/StackSizeLarge"); 974var response = await deploymentResult.HttpClient.GetAsync("/OnCompletedThrows"); 1060var response = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 1073var response = await DeployAppWithStartupFailure(deploymentParameters); 1092var response = await DeployAppWithStartupFailure(deploymentParameters); 1115var response = await deploymentResult.HttpClient.GetAsync("HelloWorld"); 1138var response = await deploymentResult.HttpClient.GetAsync("HelloWorld"); 1384var response = await client.GetAsync("/ANCM_HTTPS_PORT"); 1389var response = await client.GetAsync("/ANCM_HTTPS_PORT"); 1436var response = await deploymentResult.HttpClient.GetAsync("ConnectionClose"); 1486private static async Task AssertLink(HttpResponseMessage response) 1491private async Task<HttpResponseMessage> DeployAppWithStartupFailure(IISDeploymentParameters deploymentParameters) 1505var response = await deploymentResult.HttpClient.GetAsync("/HelloWorld"); 1574HttpResponseMessage response = null; 1589HttpResponseMessage response = null;
UpgradeFeatureDetectionTests.cs (1)
74var response = await deploymentResult.HttpClient.GetAsync("UpgradeFeatureDetection");
Infrastructure.Common (3)
ServiceUtilHelper.cs (3)
544HttpResponseMessage response = httpClient.GetAsync(requestUri).GetAwaiter().GetResult(); 556HttpResponseMessage response = httpClient.GetAsync(requestUri).GetAwaiter().GetResult(); 568HttpResponseMessage response = await httpClient.GetAsync(requestUri);
InMemory.FunctionalTests (6)
EventSourceTests.cs (1)
195using var responseMessage = await httpClient.SendAsync(httpRequestMessage);
Http2\Http2EndToEndTests.cs (1)
72using var responseMessage = await httpClient.SendAsync(httpRequestMessage);
KestrelMetricsTests.cs (4)
552HttpResponseMessage responseMessage = null; 630HttpResponseMessage responseMessage = null; 731using var responseMessage = await httpClient.SendAsync(httpRequestMessage); 813using var responseMessage = await httpClient.SendAsync(httpRequestMessage, HttpCompletionOption.ResponseHeadersRead).DefaultTimeout();
installer.tasks (1)
StaticFileRegeneration\RegenerateThirdPartyNotices.cs (1)
74HttpResponseMessage response = await client.GetAsync(c.Url);
Interop.FunctionalTests (79)
Http2\Http2RequestTests.cs (4)
130var response1 = await client.SendAsync(request1, CancellationToken.None); 187var response = await client.SendAsync(request1, CancellationToken.None); 214var responseMessage = await client.SendAsync(request, CancellationToken.None).DefaultTimeout(); 298var responseMessage = await client.SendAsync(request, CancellationToken.None).DefaultTimeout();
Http2WebSocketInteropTests.cs (1)
197protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Http3\Http3RequestTests.cs (36)
93var response1 = await client.SendAsync(request1, CancellationToken.None); 153var responseMessage = await client.SendAsync(request, CancellationToken.None).DefaultTimeout(); 255var response = await client.SendAsync(request, CancellationToken.None); 306var response = await responseTask.DefaultTimeout(); 341var response1 = await SendRequestAsync(protocol, host, client); 354var response2 = await SendRequestAsync(protocol, host, client); 369static async Task<HttpResponseMessage> SendRequestAsync(HttpProtocols protocol, IHost host, HttpMessageInvoker client) 387var response = await responseTask.DefaultTimeout(); 432var response = await responseTask.DefaultTimeout(); 632var response = await sendTask; 735var response = await responseTask.DefaultTimeout(); 819var response = await client.SendAsync(request, CancellationToken.None); 855var response1 = await client.SendAsync(request1, CancellationToken.None); 866var response2 = await client.SendAsync(request2, CancellationToken.None); 915var response1 = await client.SendAsync(request1, CancellationToken.None); 928var response2 = await client.SendAsync(request2, CancellationToken.None); 944var response3 = await client.SendAsync(request3, CancellationToken.None); 1029var response = await responseTask.DefaultTimeout(); 1124var response = await responseTask.DefaultTimeout(); 1265var response = await responseTask.DefaultTimeout(); 1321var response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead); 1374var response = await client.SendAsync(request, CancellationToken.None); 1426var response1 = await client.SendAsync(request1, CancellationToken.None); 1436var response2 = await client.SendAsync(request2, CancellationToken.None); 1493var response1 = await client.SendAsync(request1, CancellationToken.None); 1504var response2 = await client.SendAsync(request2, CancellationToken.None); 1564var response2 = await client.SendAsync(request2, CancellationToken.None); 1607var response1 = await client.SendAsync(request1, CancellationToken.None); 1667var response1 = await client.SendAsync(request1, CancellationToken.None); 1723var response1 = await client.SendAsync(request1, CancellationToken.None); 1808var response1 = await responseTask1.DefaultTimeout(); 1830var response3 = await client.SendAsync(CreateHttp3Request(HttpMethod.Get, $"https://127.0.0.1:{port}/3"), CancellationToken.None); 1966var response1 = await client.SendAsync(request1, CancellationToken.None); 2053var response = await responseTask.DefaultTimeout(); 2153var response = await responseTask.DefaultTimeout(); 2196var response = await client.SendAsync(request, CancellationToken.None).DefaultTimeout();
Http3\Http3TlsTests.cs (7)
61var response = await client.SendAsync(request, CancellationToken.None).DefaultTimeout(); 107var response = await client.SendAsync(request, CancellationToken.None).DefaultTimeout(); 149var response = await client.SendAsync(request, CancellationToken.None).DefaultTimeout(); 209using var response = await sendTask.DefaultTimeout(); 248var response = await client.SendAsync(request, CancellationToken.None).DefaultTimeout(); 327var response = await client.SendAsync(request, CancellationToken.None).DefaultTimeout(); 492var response = await client.SendAsync(request, CancellationToken.None).DefaultTimeout();
HttpClientHttp2InteropTests.cs (31)
64var response = await client.GetAsync(url).DefaultTimeout(); 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(); 302var response = await responseTask; 379var response = await responseTask; 436using var response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead).DefaultTimeout(); 535var response = await client.GetAsync(url).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(); 794using var response = await requestTask; 972var response = await client.GetAsync(url, HttpCompletionOption.ResponseHeadersRead).DefaultTimeout(); 1013var response = await client.GetAsync(url, HttpCompletionOption.ResponseHeadersRead).DefaultTimeout(); 1064var response = await requestTask.DefaultTimeout(); 1108var response = await client.GetAsync(url).DefaultTimeout(); 1173var response = await requestTask.DefaultTimeout(); 1226var tasks = new List<Task<HttpResponseMessage>>(10); 1234foreach (var response in responses) 1287var tasks = new List<Task<HttpResponseMessage>>(10); 1295foreach (var response in responses) 1330var response = await client.PostAsync(url, new ByteArrayContent(new byte[1024 * 18])).DefaultTimeout(); 1445var response = await requestTask.DefaultTimeout(); 1533var response0 = await requestTask0.DefaultTimeout(); 1534var response1 = await requestTask0.DefaultTimeout(); 1568var response = await client.SendAsync(request).DefaultTimeout(); 1590var response = await client.GetAsync(url + " !\"$%&'()*++,-./0123456789:;<>=@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`{|}~點看").DefaultTimeout(); 1634var response = await client.GetAsync(url).DefaultTimeout(); 1679var response = await client.GetAsync(url).DefaultTimeout();
JwtClientSample (1)
Program.cs (1)
84var httpResponse = await new HttpClient().GetAsync(ServerUrl + $"/generatetoken?user={userId}");
Keycloak.Web (1)
AuthorizationHandler.cs (1)
8protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Microsoft.Arcade.Common (3)
ArcadeHttpMessageHandler.cs (2)
15public Task<HttpResponseMessage> SendAsync(HttpRequestMessage request) => SendAsync(request, CancellationToken.None); 17protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
RequestResponseHelper.cs (1)
14public HttpResponseMessage ResponseMessage { get; set;}
Microsoft.Arcade.Test.Common (4)
FakeHttpClient.cs (4)
15public static HttpClient WithResponses(params HttpResponseMessage[] responses) 21private readonly IEnumerator<HttpResponseMessage> _responseEnumerator; 23public FakeHttpMessageHandler(IEnumerable<HttpResponseMessage> responses) 36protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Microsoft.AspNetCore.Authentication.Facebook (1)
FacebookHandler.cs (1)
52var response = await Backchannel.GetAsync(endpoint, Context.RequestAborted);
Microsoft.AspNetCore.Authentication.Google (1)
GoogleHandler.cs (1)
50var response = await Backchannel.SendAsync(request, Context.RequestAborted);
Microsoft.AspNetCore.Authentication.MicrosoftAccount (1)
MicrosoftAccountHandler.cs (1)
46var response = await Backchannel.SendAsync(request, Context.RequestAborted);
Microsoft.AspNetCore.Authentication.OAuth (2)
OAuthHandler.cs (2)
222var response = await Backchannel.SendAsync(requestMessage, Context.RequestAborted); 232private static OAuthTokenResponse PrepareFailedOAuthTokenResponse(HttpResponseMessage response, string body)
Microsoft.AspNetCore.Authentication.OpenIdConnect (5)
OpenIdConnectHandler.cs (5)
599var parResponseMessage = await Backchannel.SendAsync(requestMessage, Context.RequestAborted); 608private async Task<string> GetPushedAuthorizationRequestUri(HttpResponseMessage parResponseMessage) 994var responseMessage = await Backchannel.SendAsync(requestMessage, Context.RequestAborted); 1060var responseMessage = await Backchannel.SendAsync(requestMessage, Context.RequestAborted); 1513private OpenIdConnectProtocolException CreateOpenIdConnectProtocolException(OpenIdConnectMessage message, HttpResponseMessage? response)
Microsoft.AspNetCore.Authentication.Test (203)
AuthenticationMiddlewareTests.cs (1)
56var response = await server.CreateClient().GetAsync("http://example.com/");
CertificateTests.cs (28)
57var response = await server.CreateClient().GetAsync("https://example.com/"); 73var response = await server.CreateClient().GetAsync("https://example.com/"); 88var response = await server.CreateClient().GetAsync("https://example.com/"); 104var response = await server.CreateClient().GetAsync("https://example.com/"); 120var response = await server.CreateClient().GetAsync("https://example.com/"); 137var response = await server.CreateClient().GetAsync("https://example.com/"); 154var response = await server.CreateClient().GetAsync("https://example.com/"); 172var response = await server.CreateClient().GetAsync("https://example.com/"); 189var response = await server.CreateClient().GetAsync("https://example.com/"); 207var response = await server.CreateClient().GetAsync("https://example.com/"); 224var response = await server.CreateClient().GetAsync("https://example.com/"); 240var response = await server.CreateClient().GetAsync("https://example.com/"); 257var response = await server.CreateClient().GetAsync("https://example.com/"); 271var response = await server.CreateClient().GetAsync("https://example.com/"); 285var response = await server.CreateClient().GetAsync("https://example.com/"); 308var response = await server.CreateClient().GetAsync("https://example.com/"); 326var response = await server.CreateClient().GetAsync("https://example.com/"); 343var response = await server.CreateClient().GetAsync("https://example.com/"); 361var response = await server.CreateClient().GetAsync("https://example.com/"); 378var response = await server.CreateClient().GetAsync("https://example.com/"); 396var response = await client.GetAsync("https://example.com/"); 413var response = await client.GetAsync("https://example.com/"); 432var response = await client.GetAsync("https://example.com/"); 450var response = await client.GetAsync("https://example.com/"); 465var response = await server.CreateClient().GetAsync("https://example.com/"); 596var response = await server.CreateClient().GetAsync("https://example.com/"); 666var response = await server.CreateClient().GetAsync("https://example.com/"); 723var response = await server.CreateClient().GetAsync("https://example.com/");
CookieTests.cs (2)
40var response = await server.CreateClient().GetAsync("http://example.com/normal"); 1937public HttpResponseMessage Response { get; set; }
DynamicSchemeTests.cs (2)
31var response = await server.CreateClient().GetAsync("http://example.com/add/One"); 66var response = await server.CreateClient().GetAsync("http://example.com/add/One");
FacebookTests.cs (7)
139var res = transaction.Response; 171var res = transaction.Response; 203var res = transaction.Response; 335var res = new HttpResponseMessage(HttpStatusCode.OK); 344var res = new HttpResponseMessage(HttpStatusCode.OK); 478private static HttpResponseMessage ReturnJsonResponse(object content, HttpStatusCode code = HttpStatusCode.OK) 480var res = new HttpResponseMessage(code);
GoogleTests.cs (2)
1122private static HttpResponseMessage ReturnJsonResponse(object content, HttpStatusCode code = HttpStatusCode.OK) 1124var res = new HttpResponseMessage(code);
JwtBearerTests.cs (1)
909var response = await server.CreateClient().SendAsync(new HttpRequestMessage(HttpMethod.Get, string.Empty));
JwtBearerTests_Handler.cs (1)
854var response = await server.CreateClient().SendAsync(new HttpRequestMessage(HttpMethod.Get, string.Empty));
MicrosoftAccountTests.cs (5)
144var res = transaction.Response; 162var res = transaction.Response; 180var res = transaction.Response; 425private static HttpResponseMessage ReturnJsonResponse(object content) 427var res = new HttpResponseMessage(HttpStatusCode.OK);
OAuthTests.cs (8)
132var res = transaction.Response; 160var res = transaction.Response; 190var res = transaction.Response; 216var res = transaction.Response; 245var res = transaction.Response; 274var res = transaction.Response; 533private static HttpResponseMessage ReturnJsonResponse(object content, HttpStatusCode code = HttpStatusCode.OK) 535var res = new HttpResponseMessage(code);
OpenIdConnect\OpenIdConnectChallengeTests.cs (28)
35var res = transaction.Response; 68var res = transaction.Response; 103var res = transaction.Response; 124var res = transaction.Response; 163var res = transaction.Response; 196var res = transaction.Response; 231var res = transaction.Response; 274var res = transaction.Response; 311var res = transaction.Response; 355var res = transaction.Response; 389var res = transaction.Response; 419var res = transaction.Response; 487var res = transaction.Response; 509var res = transaction.Response; 530var res = transaction.Response; 554var res = transaction.Response; 576var res = transaction.Response; 600var res = transaction.Response; 624var res = transaction.Response; 648var res = transaction.Response; 670var res = transaction.Response; 691var res = transaction.Response; 718var res = transaction.Response; 808var res = transaction.Response; 847var res = transaction.Response; 881var res = transaction.Response; 912var res = transaction.Response; 972protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
OpenIdConnect\OpenIdConnectEventTests.cs (36)
45var response = await PostAsync(server, "signin-oidc", ""); 91var response = await PostAsync(server, "signin-oidc", ""); 113var response = await PostAsync(server, "signin-oidc", "id_token=my_id_token&state=protected_state"); 162var response = await PostAsync(server, "signin-oidc", "id_token=my_id_token&state=protected_state"); 198var response = await PostAsync(server, "signin-oidc", "id_token=my_id_token&state=protected_state"); 221var response = await PostAsync(server, "signin-oidc", "id_token=my_id_token&state=protected_state&code=my_code"); 272var response = await PostAsync(server, "signin-oidc", "id_token=my_id_token&state=protected_state&code=my_code"); 302var response = await PostAsync(server, "signin-oidc", "id_token=my_id_token&state=protected_state&code=my_code"); 326var response = await PostAsync(server, "signin-oidc", "id_token=my_id_token&state=protected_state&code=my_code"); 379var response = await PostAsync(server, "signin-oidc", "id_token=my_id_token&state=protected_state&code=my_code"); 410var response = await PostAsync(server, "signin-oidc", "id_token=my_id_token&state=protected_state&code=my_code"); 434var response = await PostAsync(server, "signin-oidc", "state=protected_state&code=my_code"); 487var response = await PostAsync(server, "signin-oidc", "state=protected_state&code=my_code"); 518var response = await PostAsync(server, "signin-oidc", "state=protected_state&code=my_code"); 543var response = await PostAsync(server, "signin-oidc", "id_token=my_id_token&state=protected_state&code=my_code"); 598var response = await PostAsync(server, "signin-oidc", "id_token=my_id_token&state=protected_state&code=my_code"); 630var response = await PostAsync(server, "signin-oidc", "id_token=my_id_token&state=protected_state&code=my_code"); 661var response = await PostAsync(server, "signin-oidc", "id_token=my_id_token&state=protected_state&code=my_code"); 728var response = await PostAsync(server, "signin-oidc", "id_token=my_id_token&state=protected_state&code=my_code"); 776var response = await PostAsync(server, "signin-oidc", "id_token=my_id_token&state=protected_state&code=my_code"); 798var response = await PostAsync(server, "signin-oidc", "error=access_denied&state=protected_state"); 822var response = await PostAsync(server, "signin-oidc", "error=access_denied&state=protected_state"); 859var response = await PostAsync(server, "signin-oidc", "id_token=my_id_token&state=protected_state&code=my_code"); 893var response = await PostAsync(server, "signin-oidc", "id_token=my_id_token&state=protected_state&code=my_code"); 919var response = await PostAsync(server, "signin-oidc", "id_token=my_id_token&state=protected_state&code=my_code"); 946var response = await PostAsync(server, "signin-oidc", "id_token=my_id_token&state=protected_state&code=my_code"); 967var response = await client.GetAsync("/"); 994var response = await client.GetAsync("/"); 1011var response = await client.GetAsync("/signout-oidc"); 1037var response = await client.GetAsync("/signout-oidc"); 1063var response = await client.GetAsync("/signout-oidc"); 1080var response = await client.GetAsync("/signout-callback-oidc?state=protected_state"); 1103var response = await client.GetAsync("/signout-callback-oidc?state=protected_state"); 1130var response = await client.GetAsync("/signout-callback-oidc?state=protected_state"); 1308private Task<HttpResponseMessage> PostAsync(TestServer server, string path, string form) 1391protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
OpenIdConnect\OpenIdConnectEventTests_Handler.cs (36)
45var response = await PostAsync(server, "signin-oidc", ""); 91var response = await PostAsync(server, "signin-oidc", ""); 113var response = await PostAsync(server, "signin-oidc", "id_token=my_id_token&state=protected_state"); 162var response = await PostAsync(server, "signin-oidc", "id_token=my_id_token&state=protected_state"); 198var response = await PostAsync(server, "signin-oidc", "id_token=my_id_token&state=protected_state"); 221var response = await PostAsync(server, "signin-oidc", "id_token=my_id_token&state=protected_state&code=my_code"); 272var response = await PostAsync(server, "signin-oidc", "id_token=my_id_token&state=protected_state&code=my_code"); 302var response = await PostAsync(server, "signin-oidc", "id_token=my_id_token&state=protected_state&code=my_code"); 326var response = await PostAsync(server, "signin-oidc", "id_token=my_id_token&state=protected_state&code=my_code"); 379var response = await PostAsync(server, "signin-oidc", "id_token=my_id_token&state=protected_state&code=my_code"); 410var response = await PostAsync(server, "signin-oidc", "id_token=my_id_token&state=protected_state&code=my_code"); 434var response = await PostAsync(server, "signin-oidc", "state=protected_state&code=my_code"); 487var response = await PostAsync(server, "signin-oidc", "state=protected_state&code=my_code"); 518var response = await PostAsync(server, "signin-oidc", "state=protected_state&code=my_code"); 543var response = await PostAsync(server, "signin-oidc", "id_token=my_id_token&state=protected_state&code=my_code"); 598var response = await PostAsync(server, "signin-oidc", "id_token=my_id_token&state=protected_state&code=my_code"); 630var response = await PostAsync(server, "signin-oidc", "id_token=my_id_token&state=protected_state&code=my_code"); 661var response = await PostAsync(server, "signin-oidc", "id_token=my_id_token&state=protected_state&code=my_code"); 728var response = await PostAsync(server, "signin-oidc", "id_token=my_id_token&state=protected_state&code=my_code"); 776var response = await PostAsync(server, "signin-oidc", "id_token=my_id_token&state=protected_state&code=my_code"); 798var response = await PostAsync(server, "signin-oidc", "error=access_denied&state=protected_state"); 822var response = await PostAsync(server, "signin-oidc", "error=access_denied&state=protected_state"); 859var response = await PostAsync(server, "signin-oidc", "id_token=my_id_token&state=protected_state&code=my_code"); 893var response = await PostAsync(server, "signin-oidc", "id_token=my_id_token&state=protected_state&code=my_code"); 919var response = await PostAsync(server, "signin-oidc", "id_token=my_id_token&state=protected_state&code=my_code"); 946var response = await PostAsync(server, "signin-oidc", "id_token=my_id_token&state=protected_state&code=my_code"); 967var response = await client.GetAsync("/"); 994var response = await client.GetAsync("/"); 1011var response = await client.GetAsync("/signout-oidc"); 1037var response = await client.GetAsync("/signout-oidc"); 1063var response = await client.GetAsync("/signout-oidc"); 1080var response = await client.GetAsync("/signout-callback-oidc?state=protected_state"); 1103var response = await client.GetAsync("/signout-callback-oidc?state=protected_state"); 1130var response = await client.GetAsync("/signout-callback-oidc?state=protected_state"); 1306private Task<HttpResponseMessage> PostAsync(TestServer server, string path, string form) 1386protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
OpenIdConnect\OpenIdConnectTests.cs (6)
48var res = transaction.Response; 75var res = transaction.Response; 102var res = transaction.Response; 128var res = transaction.Response; 155var res = transaction.Response; 180var res = transaction.Response;
OpenIdConnect\TestSettings.cs (2)
318protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 332private async Task<HttpResponseMessage> ReturnResource(string resource)
OpenIdConnect\TestTransaction.cs (1)
13public HttpResponseMessage Response { get; set; }
TestHttpMessageHandler.cs (3)
10public Func<HttpRequestMessage, HttpResponseMessage> Sender { get; set; } 12protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) 19return Task.FromResult<HttpResponseMessage>(null);
Transaction.cs (1)
12public HttpResponseMessage Response { get; set; }
TwitterTests.cs (9)
221var response = await client.SendAsync(request); 271var response = await client.SendAsync(request); 378var response = await client.SendAsync(request); 399var res = new HttpResponseMessage(HttpStatusCode.OK); 468var res = new HttpResponseMessage(HttpStatusCode.OK); 484var res = new HttpResponseMessage(HttpStatusCode.OK); 592private HttpResponseMessage BackchannelRequestToken(HttpRequestMessage req) 607private HttpResponseMessage JsonErroredBackchannelRequestToken(HttpRequestMessage req) 622private HttpResponseMessage UnknownContentTypeErroredBackchannelRequestToken(HttpRequestMessage req)
WsFederation\WsFederationTest.cs (12)
75var response = await httpClient.GetAsync("/"); 91var response = await httpClient.GetAsync("/mapped-challenge"); 107var response = await httpClient.GetAsync("/premapped-challenge"); 123var response = await httpClient.GetAsync("/"); 156var response = await httpClient.PostAsync(httpClient.BaseAddress + "signin-wsfed", form); 174var response = await httpClient.GetAsync("/"); 191var response = await httpClient.GetAsync("/signin-wsfed?wa=wsignoutcleanup1.0"); 233var result = await server.CreateClient().GetAsync(""); 262private void CopyCookies(HttpResponseMessage response, HttpRequestMessage request) 450protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 453var newResponse = new HttpResponseMessage() { Content = new StringContent(metadata, Encoding.UTF8, "text/xml") }; 454return Task.FromResult<HttpResponseMessage>(newResponse);
WsFederation\WsFederationTest_Handler.cs (12)
73var response = await httpClient.GetAsync("/"); 89var response = await httpClient.GetAsync("/mapped-challenge"); 105var response = await httpClient.GetAsync("/premapped-challenge"); 121var response = await httpClient.GetAsync("/"); 154var response = await httpClient.PostAsync(httpClient.BaseAddress + "signin-wsfed", form); 172var response = await httpClient.GetAsync("/"); 189var response = await httpClient.GetAsync("/signin-wsfed?wa=wsignoutcleanup1.0"); 231var result = await server.CreateClient().GetAsync(""); 260private void CopyCookies(HttpResponseMessage response, HttpRequestMessage request) 446protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 449var newResponse = new HttpResponseMessage() { Content = new StringContent(metadata, Encoding.UTF8, "text/xml") }; 450return Task.FromResult<HttpResponseMessage>(newResponse);
Microsoft.AspNetCore.Authentication.Twitter (5)
TwitterHandler.cs (5)
183private async Task<HttpResponseMessage> ExecuteRequestAsync(string url, HttpMethod httpMethod, RequestToken? accessToken = null, Dictionary<string, string>? extraOAuthPairs = null, Dictionary<string, string>? queryParameters = null, Dictionary<string, string>? formData = null) 273var response = await ExecuteRequestAsync(TwitterDefaults.RequestTokenEndpoint, HttpMethod.Post, extraOAuthPairs: new Dictionary<string, string>() { { "oauth_callback", callBackUri } }); 299var response = await ExecuteRequestAsync(TwitterDefaults.AccessTokenEndpoint, HttpMethod.Post, token, formData: formPost); 324var response = await ExecuteRequestAsync("https://api.twitter.com/1.1/account/verify_credentials.json", HttpMethod.Get, accessToken, queryParameters: new Dictionary<string, string>() { { "include_email", "true" } }); 356private async Task EnsureTwitterRequestSuccess(HttpResponseMessage response)
Microsoft.AspNetCore.CookiePolicy.Test (1)
Transaction.cs (1)
13public HttpResponseMessage Response { get; set; }
Microsoft.AspNetCore.Cors.Test (10)
CorsMiddlewareTests.cs (10)
51var response = await server.CreateRequest("/") 93var response = await server.CreateRequest("/") 144var response = await server.CreateRequest("/") 193var response = await server.CreateRequest("/") 258var response = await server.CreateRequest("/") 321var response = await server.CreateRequest("/") 364var response = await server.CreateRequest("/") 480var response = await server.CreateRequest("/") 538var response = await server.CreateRequest("/") 614var response = await server.CreateRequest("/")
Microsoft.AspNetCore.Diagnostics.HealthChecks.Tests (31)
HealthCheckEndpointRouteBuilderExtensionsTest.cs (2)
77var response = await client.GetAsync("/healthz"); 122var response = await client.GetAsync("/healthz");
HealthCheckMiddlewareSampleTest.cs (4)
29var response = await client.GetAsync("/health"); 51var response = await client.GetAsync("/health"); 74var response = await client.GetAsync("/health/live"); 96var response = await client.GetAsync("/health/ready");
HealthCheckMiddlewareTests.cs (25)
65var response = await client.GetAsync("/frob"); 92var response = await client.GetAsync("/HEALTH"); 119var response = await client.GetAsync("/health"); 149var response = await client.GetAsync("/health"); 182var response = await client.GetAsync("/health"); 215var response = await client.GetAsync("/health"); 248var response = await client.GetAsync("/health"); 281var response = await client.GetAsync("/health"); 327var response = await client.GetAsync("/health"); 364var response = await client.GetAsync("/health"); 399var response = await client.GetAsync("/health"); 428var response = await client.GetAsync("/health"); 463var response = await client.GetAsync("/health"); 502var response = await client.GetAsync("/health"); 532var response = await client.GetAsync("http://localhost:5001/health"); 562var response = await client.GetAsync("http://localhost:5001/health/"); 590var response = await client.GetAsync("http://localhost:5001/HEALTH"); 620var response = await client.GetAsync("http://localhost:5001/health/detailed"); 655var response = await client.GetAsync("http://localhost:5001/health/detailed"); 692var response = await client.GetAsync("http://localhost:5001/health/detailed"); 730var response = await client.GetAsync("http://localhost:5001/health"); 768var response = await client.GetAsync("http://localhost:5001/health"); 806var response = await client.GetAsync("http://localhost:5000/health"); 848var response = await client.GetAsync("http://localhost:5001/health/detailed"); 892var response = await client.GetAsync("http://localhost:5001/health");
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (21)
Latency\ChecpointAcceptanceTests.cs (2)
103HttpResponseMessage? response = null; 127using var response = await host.GetTestServer().CreateClient().GetAsync("/Path");
Logging\AcceptanceTests.cs (13)
173using var response = await client.PostAsync("/", content).ConfigureAwait(false); 233using var response = await client.PostAsync("/", content).ConfigureAwait(false); 298using var response = await client.SendAsync(request).ConfigureAwait(false); 359using var response = await client.SendAsync(httpMessage).ConfigureAwait(false); 407using var response = await client.DeleteAsync("/").ConfigureAwait(false); 449using var response = await client.GetAsync(RequestPath).ConfigureAwait(false); 479using var response = await client.DeleteAsync("/").ConfigureAwait(false); 512using var firstResponse = await client.DeleteAsync("/").ConfigureAwait(false); 517using var secondResponse = await client.DeleteAsync("/").ConfigureAwait(false); 670using var response = await client.PostAsync("/", content).ConfigureAwait(false); 700using var response = await client.GetAsync(httpPath).ConfigureAwait(false); 730using var response = await client.GetAsync("").ConfigureAwait(false); 746using var response = await client.GetAsync("").ConfigureAwait(false);
Logging\AcceptanceTests.Mvc.cs (5)
65using var response = await client.GetAsync($"/api/users/{UserId}/someTestData?{QueryParamName}=foo").ConfigureAwait(false); 100using var response = await client.GetAsync($"/api/users/{UserId}/someTestData?{QueryParamName}=foo").ConfigureAwait(false); 146using var response = await client.GetAsync($"/api/users/{UserId}/{NoDataClassParamValue}?{QueryParamName}=foo").ConfigureAwait(false); 190using var response = await client.GetAsync($"/api/users/{UserId}/someTestData?{QueryParamName}=foo").ConfigureAwait(false); 231using var response = await client.GetAsync(RequestPath).ConfigureAwait(false);
Logging\AcceptanceTests.Routing.cs (1)
65using var response = await client.GetAsync(httpPath).ConfigureAwait(false);
Microsoft.AspNetCore.Diagnostics.Tests (40)
DeveloperExceptionPageMiddlewareTest.cs (11)
66var response = await server.CreateClient().SendAsync(request); 119var response = await server.CreateClient().SendAsync(request); 178var response = await server.CreateClient().SendAsync(request); 255var response = await client.GetAsync("/path"); 290var response = await server.CreateClient().GetAsync("/path"); 330var response = await client.GetAsync("/path"); 363var response = await server.CreateClient().GetAsync("/path"); 400var response = await server.CreateClient().GetAsync("/path"); 436var response = await server.CreateClient().GetAsync("/path"); 474var response = await server.CreateClient().GetAsync("/path"); 606var response = await server.CreateClient().GetAsync("/path");
ExceptionHandlerMiddlewareTest.cs (3)
72var response = await server.CreateClient().SendAsync(request); 338var response = await server.CreateClient().GetAsync("/path"); 405var response = await server.CreateClient().GetAsync("/path");
ExceptionHandlerTest.cs (18)
61var response = await client.GetAsync(string.Empty); 116var response = await client.GetAsync(string.Empty); 182var response = await client.GetAsync(string.Empty); 238var response = await client.GetAsync(string.Empty); 293var response = await client.GetAsync(string.Empty); 365var response = await client.GetAsync(string.Empty); 435var response = await client.GetAsync(string.Empty); 599var response = await client.GetAsync("throw"); 648var response = await client.GetAsync("throw"); 689var response = await client.GetAsync("throw"); 728var response = await client.GetAsync("throw"); 769var response = await client.GetAsync("throw"); 820var response = await client.GetAsync(string.Empty); 874var response = await client.GetAsync(string.Empty); 926var response = await client.GetAsync(string.Empty); 984var response = await client.GetAsync(string.Empty); 1028var response = await server.CreateClient().GetAsync("/path"); 1098var response = await server.CreateClient().GetAsync("/path");
StatusCodeMiddlewareTest.cs (8)
61var response = await client.GetAsync(destination); 127var response = await client.GetAsync(destination + "?name=James"); 189var response = await client.GetAsync(destination + "?name=James"); 244var response = await client.GetAsync(destination + "?name=James"); 278var response = await client.GetAsync("/"); 312var response = await client.GetAsync("/"); 349var response = await client.GetAsync("/skip"); 387var response = await client.GetAsync("/");
Microsoft.AspNetCore.FunctionalTests (6)
WebHostFunctionalTests.cs (6)
39var response = await RetryHelper.RetryRequest(() => deploymentResult.HttpClient.GetAsync(string.Empty), logger, deploymentResult.HostShutdownToken, retryCount: 5); 64var response = await RetryHelper.RetryRequest(() => deploymentResult.HttpClient.GetAsync(string.Empty), logger, deploymentResult.HostShutdownToken, retryCount: 5); 91var response = await RetryHelper.RetryRequest(() => deploymentResult.HttpClient.GetAsync(string.Empty), logger, deploymentResult.HostShutdownToken); 165var response = await RetryHelper.RetryRequest(() => deploymentResult.HttpClient.GetAsync(string.Empty), Logger, deploymentResult.HostShutdownToken, retryCount: 5); 184private async Task ExecuteStartOrStartWithTest(Func<DeploymentResult, Task<HttpResponseMessage>> getResponse, string applicationName) 188var response = await RetryHelper.RetryRequest(() => getResponse(deploymentResult), logger, deploymentResult.HostShutdownToken);
Microsoft.AspNetCore.HeaderPropagation (1)
HeaderPropagationMessageHandler.cs (1)
41protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Microsoft.AspNetCore.HeaderPropagation.Tests (6)
HeaderPropagationIntegrationTest.cs (5)
64var response = await client.SendAsync(request); 113var response = await client.SendAsync(request); 140var response = await client.SendAsync(request); 186var response = await client.SendAsync(request); 232protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
HeaderPropagationMessageHandlerTest.cs (1)
264protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request,
Microsoft.AspNetCore.HostFiltering.Tests (5)
HostFilteringMiddlewareTests.cs (5)
74var response = await server.CreateClient().GetAsync("/"); 117var response = await server.CreateClient().GetAsync("/"); 168var response = await server.CreateRequest("/").GetAsync(); 220var response = await server.CreateRequest("/").GetAsync(); 259var response = await server.CreateRequest("/").GetAsync();
Microsoft.AspNetCore.Hosting.FunctionalTests (1)
LinkedApplicationTests.cs (1)
46var response = await RetryHelper.RetryRequest(() => result.HttpClient.GetAsync("/"), logger, retryCount: 10);
Microsoft.AspNetCore.Http.Connections.Client (14)
HttpConnection.cs (1)
485using (var response = await httpClient.SendAsync(request, HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false))
Internal\AccessTokenHttpMessageHandler.cs (2)
22protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 40var result = await base.SendAsync(request, cancellationToken).ConfigureAwait(false);
Internal\Http2HttpMessageHandler.cs (1)
20protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Internal\LoggingHttpMessageHandler.cs (2)
25protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 29var response = await base.SendAsync(request, cancellationToken).ConfigureAwait(false);
Internal\LongPollingTransport.cs (3)
57using (var response = await _httpClient.SendAsync(request, cancellationToken).ConfigureAwait(false)) 156HttpResponseMessage response; 235var response = await _httpClient.SendAsync(request).ConfigureAwait(false);
Internal\LongPollingTransport.Log.cs (1)
44public static void PollResponseReceived(ILogger logger, HttpResponseMessage response)
Internal\SendUtils.cs (1)
51using (var response = await httpClient.SendAsync(request, HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false))
Internal\ServerSentEventsTransport.cs (3)
58HttpResponseMessage? response = null; 88private async Task ProcessAsync(Uri url, HttpResponseMessage response) 126private async Task ProcessEventStream(HttpResponseMessage response, CancellationToken cancellationToken)
Microsoft.AspNetCore.Http.Connections.Tests (5)
HttpConnectionDispatcherTests.cs (5)
3259var response = await client.GetAsync("generatetoken?user=bob"); 3322var response = await client.GetAsync("signin?user=bob"); 3421var response = await client.GetAsync("generatetoken?user=bob"); 3607protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 3609var response = await base.SendAsync(request, cancellationToken);
Microsoft.AspNetCore.Http.Extensions.Tests (2)
HttpResponseJsonExtensionsTests.cs (2)
512var result = await client.GetAsync("/"); 544var result = await client.GetAsync("/");
Microsoft.AspNetCore.HttpLogging.Tests (11)
HttpLoggingMiddlewareTests.cs (11)
1731var initialResponse = await client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "/attr_responseonly")); 1746var initialResponse = await client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "/attr_responseandrequest")); 1761var initialResponse = await client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "/attr_restrictedheaders")); 1778var initialResponse = await client.SendAsync(request); 1804var initialResponse = await client.SendAsync(request); 1821var initialResponse = await client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "/ext_responseonly")); 1836var initialResponse = await client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "/ext_responseandrequest")); 1851var initialResponse = await client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "/ext_restrictedheaders")); 1868var initialResponse = await client.SendAsync(request); 1894var initialResponse = await client.SendAsync(request); 1940var initialResponse = await client.SendAsync(request);
Microsoft.AspNetCore.HttpsPolicy.Tests (17)
HstsMiddlewareTests.cs (8)
68var response = await client.SendAsync(request); 114var response = await client.SendAsync(request); 160var response = await client.SendAsync(request); 205var response = await client.SendAsync(request); 260var response = await client.SendAsync(request); 315var response = await client.SendAsync(request); 362var response = await client.SendAsync(request); 408var response = await client.SendAsync(request);
HttpsPolicyTests.cs (1)
67var response = await client.SendAsync(request);
HttpsRedirectionMiddlewareTests.cs (8)
53var response = await client.SendAsync(request); 108var response = await client.SendAsync(request); 164var response = await client.SendAsync(request); 226var response = await client.SendAsync(request); 266var response = await client.SendAsync(request); 354var response = await client.SendAsync(request); 401var response = await client.SendAsync(request); 445var response = await client.SendAsync(request);
Microsoft.AspNetCore.Identity.FunctionalTests (137)
AuthorizationTests.cs (4)
47var response = await client.GetAsync(url); 86var response = await client.GetAsync(url); 119var response = await client.GetAsync(url); 147var response = await client.GetAsync(url);
Extensions\HttpClientExtensions.cs (3)
11public static Task<HttpResponseMessage> SendAsync( 19public static Task<HttpResponseMessage> SendAsync( 30public static Task<HttpResponseMessage> SendAsync(
Extensions\ResponseAssert.cs (3)
15public static Uri IsRedirect(HttpResponseMessage responseMessage) 21public static async Task<IHtmlDocument> IsHtmlDocumentAsync(HttpResponseMessage response) 54internal static void IsOK(HttpResponseMessage download)
ManagementTests.cs (1)
343var response = await client.GetAsync("/Identity/Account/Manage/DownloadPersonalData");
MapIdentityApiTests.cs (52)
110var loginResponse = await client.PostAsJsonAsync("/identity/login", new { Email, Password }); 143var loginResponse = await client.PostAsJsonAsync("/identity/login", new { Email, Password }); 180var loginResponse = await client.PostAsJsonAsync("/identity/login", new { Email, Password }); 211var loginResponse = await client.PostAsJsonAsync("/identity/login?useCookies=true", new { Email, Password }); 259var loginResponse = await client.PostAsJsonAsync("/identity/login", new { Email, Password }); 295var loginResponse = await client.PostAsJsonAsync("/identity/login", new { Email, Password }); 299var refreshResponse = await client.PostAsJsonAsync("/identity/refresh", new { refreshToken }); 340var loginResponse = await client.PostAsJsonAsync("/identity/login", new { Email, Password }); 347var refreshResponse = await client.PostAsJsonAsync("/identity/refresh", new { refreshToken }); 414var refreshResponse = await client.PostAsJsonAsync("/identity/refresh", new { refreshToken }); 670var loginResponse = await client.PostAsJsonAsync("/identity/login", new { Email, Password }); 690var twoFactorKeyResponse = await client.PostAsJsonAsync("/identity/manage/2fa", new object()); 702var enable2faResponse = await client.PostAsJsonAsync("/identity/manage/2fa", new { twoFactorCode, Enable = true }); 728var loginResponse = await client.PostAsJsonAsync("/identity/login", new { Email, Password }); 734var twoFactorKeyResponse = await client.PostAsJsonAsync("/identity/manage/2fa", new object()); 743var enable2faResponse = await client.PostAsJsonAsync("/identity/manage/2fa", new { twoFactorCode, Enable = true }); 755var recoveryLoginResponse = await client.PostAsJsonAsync("/identity/login", new { Email, Password, TwoFactorRecoveryCode = recoveryCodes[0] }); 763var disable2faResponse = await client.PostAsJsonAsync("/identity/manage/2fa", new { Enable = false }); 780var loginResponse = await client.PostAsJsonAsync("/identity/login", new { Email, Password }); 786var twoFactorKeyResponse = await client.PostAsJsonAsync("/identity/manage/2fa", new object()); 798var enable2faResponse = await client.PostAsJsonAsync("/identity/manage/2fa", new { twoFactorCode, Enable = true }); 802var resetKeyResponse = await client.PostAsJsonAsync("/identity/manage/2fa", new { ResetSharedKey = true }); 815var reenable2faResponse = await client.PostAsJsonAsync("/identity/manage/2fa", new { TwoFactorCode = resetTwoFactorCode, Enable = true }); 827var loginResponse = await client.PostAsJsonAsync("/identity/login", new { Email, Password }); 833var twoFactorKeyResponse = await client.PostAsJsonAsync("/identity/manage/2fa", new object()); 842var enable2faResponse = await client.PostAsJsonAsync("/identity/manage/2fa", new { twoFactorCode, Enable = true }); 858var recoveryLoginResponse = await client.PostAsJsonAsync("/identity/login", new { Email, Password, TwoFactorRecoveryCode = recoveryCodes[1] }); 865var updated2faResponse = await client.PostAsJsonAsync("/identity/manage/2fa", new object()); 873var resetRecoveryResponse = await client.PostAsJsonAsync("/identity/manage/2fa", new { ResetRecoveryCodes = true }); 896var loginResponse = await client.PostAsJsonAsync("/identity/login?useCookies=true", new { Email, Password }); 899var twoFactorKeyResponse = await client.PostAsJsonAsync("/identity/manage/2fa", new object()); 911var enable2faResponse = await client.PostAsJsonAsync("/identity/manage/2fa", new { twoFactorCode, Enable = true }); 920var sessionLoginResponse = await client.PostAsJsonAsync("/identity/login?useSessionCookies=true", new { Email, Password, twoFactorCode }); 923var session2faResponse = await client.PostAsJsonAsync("/identity/manage/2fa", new object()); 929var sessionLoginResponse2 = await client.PostAsJsonAsync("/identity/login?useCookies=true&useSessionCookies=true", new { Email, Password, twoFactorCode }); 932var session2faResponse2 = await client.PostAsJsonAsync("/identity/manage/2fa", new object()); 938var persistentLoginResponse = await client.PostAsJsonAsync("/identity/login?useCookies=true", new { Email, Password, twoFactorCode }); 941var persistent2faResponse = await client.PostAsJsonAsync("/identity/manage/2fa", new object()); 1055var infoPostResponse = await client.PostAsJsonAsync("/identity/manage/info", new { newEmail }); 1132var loginResponse = await client.PostAsJsonAsync("/identity/login?useCookies=true", new { Email, Password }); 1146var infoPostResponse = await client.PostAsJsonAsync("/identity/manage/info", new { newEmail }); 1166var emailConfirmationResponse = await client.GetAsync(GetEmailConfirmationLink(email)); 1182var secondLoginResponse = await client.PostAsJsonAsync("/identity/login?useCookies=true", new { Email = newEmail, Password }); 1247var infoPostResponse = await client.PostAsJsonAsync("/identity/manage/info", new { OldPassword = Password, newPassword, newEmail }); 1394var loginResponse = await client.PostAsJsonAsync("/identity/login", new { email, Password }); 1423private static void AssertOk(HttpResponseMessage response) 1428private static void AssertOkAndEmpty(HttpResponseMessage response) 1434private static void AssertBadRequestAndEmpty(HttpResponseMessage response) 1440private static void AssertUnauthorizedAndEmpty(HttpResponseMessage response) 1446private static async Task AssertProblemAsync(HttpResponseMessage response, string? detail, string? title = null, HttpStatusCode status = HttpStatusCode.Unauthorized) 1456private static async Task AssertValidationProblemAsync(HttpResponseMessage response, string error) 1466private static void ApplyCookies(HttpClient client, HttpResponseMessage response)
NoIdentityAddedTests.cs (1)
32var response = await client.GetAsync(endpoint);
Pages\Account\ConfirmEmail.cs (1)
20var response = await client.GetAsync(link.Href);
Pages\Account\ExternalLogin.cs (4)
29var response = await Client.SendAsync(_emailForm, new Dictionary<string, string> 34var indexResponse = await Client.GetAsync(redirect); 41var response = await Client.SendAsync(_emailForm, new Dictionary<string, string> 48var registerResponse = await Client.GetAsync(redirect);
Pages\Account\ForgotPassword.cs (2)
20var response = await Client.SendAsync(_forgotPasswordForm, new Dictionary<string, string> 25var forgotPasswordConfirmationResponse = await Client.GetAsync(goToForgotPasswordConfirmation);
Pages\Account\Login.cs (12)
37var externalFormResponse = await Client.SendAsync(_externalLoginForm, _contosoButton); 39var contosoLoginResponse = await Client.GetAsync(goToContosoLogin); 48var response = await Client.GetAsync(_forgotPasswordLink.Href); 56var response = await Client.GetAsync(_reconfirmLink.Href); 64var loggedIn = await SendLoginForm(userName, password); 68var indexResponse = await Client.GetAsync(loggedInLocation); 78var failedLogin = await SendLoginForm(userName, password); 87var loginAttempt = await SendLoginForm(userName, password); 92var lockedOutResponse = await Client.GetAsync(lockedOut); 97private async Task<HttpResponseMessage> SendLoginForm(string userName, string password) 108var loggedIn = await SendLoginForm(userName, password); 112var loginWithTwoFactorResponse = await Client.GetAsync(loggedInLocation);
Pages\Account\LoginWith2fa.cs (3)
28var response = await Client.SendAsync(_twoFactorForm, new Dictionary<string, string> 35var indexResponse = await Client.GetAsync(goToIndex); 43var goToLoginWithRecoveryCode = await Client.GetAsync(_loginWithRecoveryCodeLink.Href);
Pages\Account\LoginWithRecoveryCode.cs (2)
21var response = await Client.SendAsync(_loginWithRecoveryCodeForm, new Dictionary<string, string> 27var indexPage = await Client.GetAsync(goToIndex);
Pages\Account\Manage\DeleteUser.cs (3)
21var loggedIn = await SendDeleteForm(password); 25var indexResponse = await Client.GetAsync(deleteLocation); 30private async Task<HttpResponseMessage> SendDeleteForm(string password)
Pages\Account\Manage\Email.cs (4)
38var response = await Client.SendAsync(_changeEmailForm, _confirmEmailButton); 40var manageResponse = await Client.GetAsync(goToManage); 48var response = await Client.SendAsync(_changeEmailForm, _changeEmailButton, new Dictionary<string, string> 53var manageResponse = await Client.GetAsync(goToManage);
Pages\Account\Manage\EnableAuthenticator.cs (2)
34var sendCodeResponse = await Client.SendAsync(_sendCodeForm, new Dictionary<string, string> 40var showRecoveryCodesResponse = await Client.GetAsync(goToShowRecoveryCodes);
Pages\Account\Manage\Index.cs (9)
49var goToTwoFactor = await Client.GetAsync(_twoFactorLink.Href); 58var goToTwoFactor = await Client.GetAsync(_twoFactorLink.Href); 67var goToChangePassword = await Client.GetAsync(_changePasswordLink.Href); 76var response = await Client.GetAsync(_changePasswordLink.Href); 78var setPasswordResponse = await Client.GetAsync(goToSetPassword); 85var goToPersonalData = await Client.GetAsync(_personalDataLink.Href); 92var goToEmail = await Client.GetAsync(_emailLink.Href); 99var goToExternalLogin = await Client.GetAsync(_externalLoginLink.Href); 107var goToExternalLogin = await Client.GetAsync(_externalLoginLink.Href);
Pages\Account\Manage\LinkExternalLogin.cs (2)
24var linkExternalLogin = await Client.SendAsync(_linkLoginForm, _linkLoginButton); 26var externalLoginResponse = await Client.GetAsync(goToLinkExternalLogin);
Pages\Account\Manage\ManageExternalLogin.cs (3)
21var linkedExternalLogin = await Client.SendAsync(_externalLoginForm, new Dictionary<string, string> 27var externalLoginResponse = await Client.GetAsync(goToLinkedExternalLogin); 29var manageExternalLoginResponse = await Client.GetAsync(goToManageExternalLogin);
Pages\Account\Manage\PersonalData.cs (2)
23var goToDelete = await Client.GetAsync(_deleteLink.Href); 28internal async Task<HttpResponseMessage> SubmitDownloadForm()
Pages\Account\Manage\TwoFactorAuthentication.cs (2)
38var goToEnableAuthenticator = await Client.GetAsync(_enableAuthenticatorLink.Href); 46var goToResetAuthenticator = await Client.GetAsync(_resetAuthenticatorLink.Href);
Pages\Account\Register.cs (6)
28var externalFormResponse = await Client.SendAsync(_externalLoginForm, _contosoButton); 30var contosoLoginResponse = await Client.GetAsync(goToContosoLogin); 39var registered = await Client.SendAsync(_registerForm, new Dictionary<string, string>() 48var indexResponse = await Client.GetAsync(registeredLocation); 56var registered = await Client.SendAsync(_registerForm, new Dictionary<string, string>() 65var registerResponse = await Client.GetAsync(registeredLocation);
Pages\Account\ResendEmailConfirmation.cs (1)
18public Task<HttpResponseMessage> ResendAsync(string email)
Pages\Account\ResetPassword.cs (3)
20var resetPasswordResponse = await client.GetAsync(link.Href); 28var resetPasswordResponse = await Client.SendAsync(_resetPasswordForm, new Dictionary<string, string> 36var resetPasswordConfirmationResponse = await Client.GetAsync(goToResetPasswordConfirmation);
Pages\Contoso\Login.cs (3)
36var contosoResponse = await Client.SendAsync(_loginForm, new Dictionary<string, string> 42var externalLogInResponse = await Client.GetAsync(goToExternalLogin); 46var indexResponse = await Client.GetAsync(goToIndex);
Pages\Index.cs (5)
36var goToIndex = await client.GetAsync("/"); 46var goToRegister = await Client.GetAsync(_registerLink.Href); 56var goToLogin = await Client.GetAsync(_loginLink.Href); 66var goToManage = await Client.GetAsync(_manageLink.Href); 76var goToManage = await Client.GetAsync(_manageLink.Href);
Pages\RegisterConfirmation.cs (1)
33var goToConfirm = await Client.GetAsync(_confirmLink.Href);
UserStories.cs (3)
198var response = await reconfirm.ResendAsync(email); 269var download = await personalData.SubmitDownloadForm(); 276var goToPrivacy = await client.GetAsync("/Privacy");
Microsoft.AspNetCore.Identity.InMemory.Test (1)
FunctionalTest.cs (1)
466public HttpResponseMessage Response { get; set; }
Microsoft.AspNetCore.Identity.Test (2)
RetryHandler.cs (2)
26protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 28HttpResponseMessage result = null;
Microsoft.AspNetCore.Localization.FunctionalTests (2)
LocalizationSampleTest.cs (1)
37var response = await client.SendAsync(request);
LocalizationTest.cs (1)
115var response = await client.SendAsync(request);
Microsoft.AspNetCore.Localization.Routing.Tests (3)
RouteDataRequestCultureProviderTest.cs (3)
84var response = await client.GetAsync(requestUrl); 130var response = await client.GetAsync("/page"); 206var response = await client.GetAsync(requestUrl);
Microsoft.AspNetCore.Localization.Tests (19)
AcceptLanguageHeaderRequestCultureProviderTest.cs (4)
51var response = await client.GetAsync(string.Empty); 92var response = await client.GetAsync(string.Empty); 132var response = await client.GetAsync(string.Empty); 178var response = await client.GetAsync(string.Empty);
CookieRequestCultureProviderTest.cs (5)
67var response = await client.GetAsync(string.Empty); 117var response = await client.GetAsync(string.Empty); 164var response = await client.GetAsync(string.Empty); 217var response = await client.GetAsync(string.Empty); 277var response = await client.GetAsync(string.Empty);
CustomRequestCultureProviderTest.cs (1)
60var response = await client.GetAsync("/ar/page");
QueryStringRequestCultureProviderTest.cs (8)
53var response = await client.GetAsync("/page?culture=ar-SA&ui-culture=ar-YE"); 87var response = await client.GetAsync("/page"); 128var response = await client.GetAsync("/page?culture=ar-XY&ui-culture=ar-SA"); 169var response = await client.GetAsync("/page?culture=ar-SA&ui-culture=ar-XY"); 211var response = await client.GetAsync("/page?ui-culture=ar-SA"); 253var response = await client.GetAsync("/page?culture=ar-SA"); 300var response = await client.GetAsync("/page?c=ar-SA&uic=ar-YE"); 348var response = await client.GetAsync("/page?c=FR&uic=FR");
RequestLocalizationMiddlewareTest.cs (1)
69var response = await client.GetAsync(string.Empty);
Microsoft.AspNetCore.Mvc.FunctionalTests (874)
AntiforgeryAuthTests.cs (4)
35var response = await Client.PostAsync("http://localhost/Home/AutoAntiforgery", null); 46var response = await Client.GetAsync("http://localhost/Home/Antiforgery"); 58var response = await Client.PostAsync("http://localhost/Antiforgery/Index", content: null); 68var response = await Client.PostAsync("http://localhost/IgnoreAntiforgery/Index", content: null);
AntiforgeryMiddlewareTest.cs (4)
50var result = await client.SendAsync(request); 91var result = await client.SendAsync(request); 166var result = await client.SendAsync(request); 198var result = await client.SendAsync(request);
AntiforgeryTestHelper.cs (1)
22public static CookieMetadata RetrieveAntiforgeryCookie(HttpResponseMessage response)
AntiforgeryTests.cs (11)
34var response = await Client.GetAsync("http://localhost/Antiforgery/Login"); 57var getResponse = await Client.GetAsync("http://localhost/Antiforgery/Login"); 79var response = await Client.SendAsync(request); 90var response = await Client.GetAsync("http://localhost/Antiforgery/FlushAsyncLogin"); 109var getResponse = await Client.GetAsync("http://localhost/Antiforgery/FlushAsyncLogin"); 129var response = await Client.SendAsync(request); 140var getResponse = await Client.GetAsync("http://localhost/Antiforgery/Login"); 158var response = await Client.SendAsync(request); 168var response = await Client.GetAsync("http://localhost/Antiforgery/AntiforgeryTokenAndResponseCaching"); 193var response = await Client.SendAsync(request); 206var response = await Client.SendAsync(request);
ApiBehaviorTest.cs (16)
58var response = await Client.PostAsJsonAsync("/contact", contactModel); 109var response = await Client.SendAsync(requestMessage); 125var response = await Client.SendAsync(requestMessage); 153var response = await Client.PostAsJsonAsync($"/contact/{action}", input); 174var response = await Client.PostAsJsonAsync($"/contact/ActionWithCompositeComplexTypeParameter/{requestId}", input); 190var response = await Client.GetAsync(url); 207var response = await Client.PostAsync(url, new StringContent(string.Empty)); 227var response = await Client.GetAsync(url); 248var response = await Client.GetAsync(url); 266var response = await Client.GetAsync("/contact/ActionWithInferredModelBinderType?foo=Hello!"); 281var response = await Client.GetAsync("/contact/ActionWithInferredModelBinderTypeWithExplicitModelName?bar=Hello!"); 295var response = await Client.GetAsync("/contact/ActionReturningStatusCodeResult"); 324var response = await Client.GetAsync("/contact/ActionReturningStatusCodeResult"); 342var response = await Client.GetAsync("/contact/ActionReturningProblemDetails"); 355var response = await Client.GetAsync("/contact/ActionReturningValidationProblemDetails"); 447var response = await customInvalidModelStateClient.PostAsJsonAsync("/contact/PostWithVnd", contactModel);
ApiExplorerTest.cs (57)
39var response = await Client.GetAsync("http://localhost/ApiExplorerVisibilityEnabledByConvention"); 52var response = await Client.GetAsync("http://localhost/ApiExplorerVisibilityDisabledByConvention"); 65var response = await Client.GetAsync("http://localhost/ApiExplorerVisibilitySetExplicitly/Disabled"); 78var response = await Client.GetAsync("http://localhost/ApiExplorerVisibilitySetExplicitly/Enabled"); 91var response = await Client.GetAsync("http://localhost/ApiExplorerNameSetByConvention"); 105var response = await Client.GetAsync("http://localhost/ApiExplorerNameSetExplicitly/SetOnController"); 119var response = await Client.GetAsync("http://localhost/ApiExplorerNameSetExplicitly/SetOnAction"); 133var response = await Client.GetAsync("http://localhost/ApiExplorerApiController/ActionWithIdParameter"); 147var response = await Client.GetAsync("http://localhost/ApiExplorerApiController/ActionWithSomeParameters"); 161var response = await Client.GetAsync("http://localhost/ApiExplorerRouteAndPathParametersInformation"); 175var response = await Client.GetAsync("http://localhost/ApiExplorerRouteAndPathParametersInformation/5"); 198var response = await Client.GetAsync(url); 221var response = await Client.GetAsync(url); 243var response = await Client.GetAsync(url); 272var response = await Client.GetAsync(url); 308var response = await Client.GetAsync(url); 343var response = await Client.GetAsync(url); 366var response = await Client.GetAsync( 385var response = await Client.GetAsync("http://localhost/ApiExplorerHttpMethod/All"); 399var response = await Client.GetAsync("http://localhost/ApiExplorerHttpMethod/Get"); 420var response = await Client.SendAsync(request); 443var response = await Client.SendAsync(request); 461var response = await Client.GetAsync( 481var response = await Client.GetAsync( 505var response = await Client.GetAsync( 525var response = await Client.GetAsync( 548var response = await Client.GetAsync( 570var response = await Client.GetAsync( 591var response = await Client.GetAsync( 615var response = await Client.GetAsync( 647var response = await Client.GetAsync( 679var response = await Client.GetAsync( 711var response = await Client.GetAsync( 741var response = await Client.GetAsync( 778var response = await Client.GetAsync( 813var response = await Client.GetAsync( 844var response = await Client.GetAsync("http://localhost/ApiExplorerResponseContentType/Unset"); 870var response = await Client.GetAsync("http://localhost/ApiExplorerResponseContentType/Specific"); 894var response = await Client.GetAsync("http://localhost/ApiExplorerResponseContentType/WildcardMatch"); 923var response = await Client.GetAsync("http://localhost/ApiExplorerResponseContentType/NoMatch"); 948var response = await Client.GetAsync( 967var response = await Client.GetAsync("http://localhost/ApiExplorerParameters/SimpleParameters"); 991var response = await Client.GetAsync( 1016var response = await Client.GetAsync("http://localhost/ApiExplorerParameters/SimpleModel"); 1040var response = await Client.GetAsync("http://localhost/ApiExplorerParameters/SimpleModelFromBody/5"); 1064var response = await Client.GetAsync("http://localhost/ApiExplorerParameters/ComplexModel"); 1108var response = await Client.GetAsync("ApiExplorerParameters/DefaultValueParameters"); 1140var response = await Client.GetAsync("ApiExplorerParameters/IsRequiredParameters"); 1186var response = await Client.GetAsync("ApiExplorerReload/Reload"); 1326var response = await Client.PostAsync( 1357var response = await Client.PostAsync( 1392var response = await Client.PostAsync( 1427var response = await Client.PutAsync( 1468var response = await Client.DeleteAsync( 1508var response = await Client.PostAsync( 1538var response = await Client.GetAsync($"http://localhost/ApiExplorerVoid/{path}"); 1559var response = await Client.GetAsync("http://localhost/ApiExplorerHttpMethod/All");
ApplicationModelTest.cs (12)
34var response = await Client.GetAsync("http://localhost/CoolController/GetControllerName"); 47var response = await Client.GetAsync("http://localhost/ActionModel/ActionName"); 60var response = await Client.GetAsync("http://localhost/ParameterModel/GetParameterMetadata"); 73var response = await Client.GetAsync("http://localhost/Home/GetCommonDescription"); 86var response = await Client.GetAsync("http://localhost/ApplicationModel/GetControllerDescription"); 99var response = await Client.GetAsync("http://localhost/ApplicationModel/GetActionSpecificDescription"); 112var response = await Client.GetAsync("http://localhost/License/GetLicense"); 130var response = await Client.SendAsync(request); 143var response = await Client.GetAsync("Home/CannotBeRouted"); 172var response = await Client.GetAsync("Home/RouteToSuppressPathMatching"); 185var response = await Client.GetAsync(areaName + "/MultipleAreas/Index"); 199var response = await Client.GetAsync("ActionModel/" + actionName);
AsyncActionsTests.cs (26)
34var response = await Client.GetAsync("http://localhost/AsyncActions/AsyncVoidAction"); 46var response = await Client.GetAsync("http://localhost/AsyncActions/TaskAction"); 58var response = await Client.GetAsync("http://localhost/AsyncActions/TaskExceptionAction"); 69var response = await Client.GetAsync("http://localhost/AsyncActions/TaskOfObjectAction?message=Alpha"); 81var response = await Client.GetAsync("http://localhost/AsyncActions/TaskOfObjectExceptionAction?message=Alpha"); 92var response = await Client.GetAsync("http://localhost/AsyncActions/TaskOfIActionResultAction?message=Beta"); 104var response = await Client.GetAsync("http://localhost/AsyncActions/TaskOfIActionResultExceptionAction?message=Beta"); 115var response = await Client.GetAsync("http://localhost/AsyncActions/TaskOfContentResultAction?message=Gamma"); 127var response = await Client.GetAsync("http://localhost/AsyncActions/TaskOfContentResultExceptionAction?message=Gamma"); 138var response = await Client.GetAsync("http://localhost/AsyncActions/PreCompletedValueTaskOfObjectAction?message=Delta"); 150var response = await Client.GetAsync("http://localhost/AsyncActions/PreCompletedValueTaskOfObjectExceptionAction?message=Delta"); 161var response = await Client.GetAsync("http://localhost/AsyncActions/PreCompletedValueTaskOfIActionResultAction?message=Epsilon"); 173var response = await Client.GetAsync("http://localhost/AsyncActions/PreCompletedValueTaskOfIActionResultExceptionAction?message=Epsilon"); 184var response = await Client.GetAsync("http://localhost/AsyncActions/PreCompletedValueTaskOfContentResultAction?message=Zeta"); 196var response = await Client.GetAsync("http://localhost/AsyncActions/PreCompletedValueTaskOfContentResultExceptionAction?message=Zeta"); 207var response = await Client.GetAsync("http://localhost/AsyncActions/CustomAwaitableVoidAction"); 219var response = await Client.GetAsync("http://localhost/AsyncActions/CustomAwaitableVoidExceptionAction"); 230var response = await Client.GetAsync("http://localhost/AsyncActions/CustomAwaitableOfObjectAction?message=Eta"); 242var response = await Client.GetAsync("http://localhost/AsyncActions/CustomAwaitableOfObjectExceptionAction?message=Eta"); 253var response = await Client.GetAsync("http://localhost/AsyncActions/CustomAwaitableOfIActionResultAction?message=Theta"); 265var response = await Client.GetAsync("http://localhost/AsyncActions/CustomAwaitableOfIActionResultExceptionAction?message=Theta"); 276var response = await Client.GetAsync("http://localhost/AsyncActions/CustomAwaitableOfContentResultAction?message=Iota"); 288var response = await Client.GetAsync("http://localhost/AsyncActions/CustomAwaitableOfContentResultExceptionAction?message=Iota"); 299var response = await Client.GetAsync("AsyncActions/ActionWithSuffix"); 309var response = await Client.GetAsync("AsyncActions/ActionWithSuffixAsync"); 319var response = await Client.GetAsync("AsyncActions/ActionReturningView");
AsyncDisposalTest.cs (3)
45var response = await Client.GetAsync("http://localhost/Disposal/DisposeMode/Async(false)/Throws(false)"); 57var response = await Client.GetAsync("http://localhost/Disposal/DisposeMode/Async(true)/Throws(true)"); 69var response = await Client.GetAsync("http://localhost/Disposal/DisposeMode/Async(false)/Throws(true)");
AsyncEnumerableTestBase.cs (3)
42var response = await Client.GetAsync($"asyncenumerable/{action}"); 60var response = await Client.GetAsync("asyncenumerable/GetAllProjectsWithError"); 79var response = await Client.SendAsync(request);
AuthMiddlewareAndFilterTestBase.cs (16)
39var response = await Client.GetAsync("AuthorizedActions/ActionWithoutAllowAnonymous"); 49var response = await Client.GetAsync(action); 67var response = await Client.GetAsync(action); 92var response = await Client.GetAsync("AllowAnonymousPageViaConvention"); 102var response = await Client.GetAsync("AllowAnonymousPageViaModel"); 112var response = await Client.GetAsync("PagesHome"); 131var response = await Client.SendAsync(request); 146var response = await Client.SendAsync(request); 165var response = await Client.SendAsync(request); 180var response = await Client.SendAsync(request); 199var response = await Client.SendAsync(request); 243var response = await Client.GetAsync(url); 265private async Task AssertAuthorizeResponse(HttpResponseMessage response) 271private async Task AssertForbiddenResponse(HttpResponseMessage response) 279var response = await Client.PostAsync($"Login/{action}", null); 288var response = await Client.GetAsync("/Login/LoginBearerClaimA");
AuthMiddlewareUsingRequireAuthTest.cs (4)
40var response = await Client.GetAsync(action); 59var response = await Client.GetAsync(action); 73private async Task AssertAuthorizeResponse(HttpResponseMessage response) 81var response = await Client.PostAsync($"Login/{action}", null);
BasicTests.cs (26)
51var response = await Client.GetAsync("Home/CSharp7View"); 71var response = await Client.GetAsync("PassThrough/Index?value=123"); 95var response = await Client.GetAsync(url); 115var response = await Client.GetAsync("http://localhost/Home/PlainView"); 134var response = await Client.GetAsync("Home/ViewWithPrefixedAttributeValue"); 147var response = await Client.GetAsync("Home/NoContentResult"); 161var response = await Client.GetAsync("Home/ActionReturningTask"); 178var result = await Client.GetAsync("Monitor/CountActionDescriptorInvocations"); 190var response = await Client.GetAsync("Home/HttpsOnlyAction"); 206var response = await Client.SendAsync(new HttpRequestMessage( 224var response = await Client.SendAsync(new HttpRequestMessage( 242var response = await Client.GetAsync("Home/JsonHelperInView"); 265var response = await Client.GetAsync("Home/JsonHelperWithSettingsInView?snakeCase=false"); 288var response = await Client.GetAsync("Home/JsonHelperWithSettingsInView?snakeCase=true"); 338var response = await Client.GetAsync("Links/Index?view=" + viewName); 350var response = await Client.GetAsync("Home/GetApplicationDescription"); 362var response = await Client.GetAsync("SqlData/TruncateAllDbRecords"); 404var response = await Client.PostAsync("/Home/Product", new FormUrlEncodedContent(product)); 421var response = await Client.GetAsync(url); 536var response = await Client.PostAsync("BindProperties/Action", new FormUrlEncodedContent(formContent)); 559var response = await Client.PostAsync("BindProperties/Action", new FormUrlEncodedContent(formContent)); 581var response = await Client.PostAsync("BindProperties/Action", new FormUrlEncodedContent(formContent)); 601var response = await Client.PostAsync("BindPropertiesSupportsGet/Action", new FormUrlEncodedContent(formContent)); 613var response = await Client.GetAsync("BindPropertiesSupportsGet/Action?Name=OnGetTestName"); 625var response = await Client.GetAsync("BindPropertiesWithValidation/Action?Password=Test&ConfirmPassword=different"); 652var response = await Client.SendAsync(request);
ComponentRenderingFunctionalTests.cs (6)
39var response = await client.GetAsync("http://localhost/components"); 55var response = await client.GetAsync("http://localhost/components/routable"); 72var response = await client.GetAsync("http://localhost/components/Navigation"); 86var response = await client.GetAsync("http://localhost/components/routable"); 102var response = await client.GetAsync("http://localhost/components/throws"); 164var response = await client.GetAsync("http://localhost/components");
ConsumesAttributeEndpointRoutingTests.cs (1)
15var response = await Client.GetAsync("http://localhost/Routing/HasEndpointMatch");
ConsumesAttributeTests.cs (1)
15var response = await Client.GetAsync("http://localhost/Routing/HasEndpointMatch");
ConsumesAttributeTestsBase.cs (8)
52var response = await Client.SendAsync(request); 69var response = await Client.SendAsync(request); 86var response = await Client.SendAsync(request); 105var response = await Client.SendAsync(request); 127var response = await Client.SendAsync(request); 151var response = await Client.SendAsync(request); 171var response = await Client.SendAsync(request); 194var response = await Client.SendAsync(request);
ContentNegotiationTest.cs (28)
46var response = await Client.GetAsync("http://localhost/Normal/WriteUserUsingCustomFormat"); 63var response = await Client.GetAsync("http://localhost/Normal/MultipleAllowedContentTypes"); 79var response = await Client.GetAsync("http://localhost/Normal/ReturnClassName"); 94var response = await Client.GetAsync("http://localhost/Normal/ReturnUser"); 113var response = await Client.SendAsync(request); 132var response = await Client.SendAsync(request); 157var response = await Client.SendAsync(request); 175var response = await Client.GetAsync(url + "?input=100"); 188var response = await Client.GetAsync("http://localhost/Normal/ReturnUser_NoMatchingFormatter"); 216var response = await Client.GetAsync("http://localhost/ProducesWithMediaTypeParameters/" + action); 239var response = await Client.GetAsync("http://localhost/ProducesContentBase/ReturnClassName"); 256var response = await Client.GetAsync( 274var response = await Client.GetAsync("http://localhost/NoProducesContentOnClass/ReturnClassName"); 291var response = await Client.GetAsync("http://localhost/NoProducesContentOnClass/ReturnClassName"); 308var response = await Client.GetAsync( 325var response = await Client.GetAsync("http://localhost/ProducesJson/Produces_WithNonObjectResult"); 351var response = await Client.SendAsync(request); 371var response = await Client.SendAsync(request); 389var response = await Client.SendAsync(request); 409var response = await Client.SendAsync(request); 424var response = await Client.SendAsync(request); 439var response = await Client.SendAsync(request); 453var response = await Client.SendAsync(request); 463var response = await Client.GetAsync( 475var response = await Client.GetAsync( 493var response = await Client.SendAsync(request); 511var response = await Client.SendAsync(request); 530var response = await Client.GetAsync(
ControllerEndpointFiltersTest.cs (4)
41var response = await client.GetAsync("Items/Index"); 54var response = await client.GetAsync("Items/Index"); 67var response = await client.GetAsync("Items/IndexWithSelectiveFilter"); 79var response = await client.GetAsync("Items/IndexWithArgument/foobar");
ControllerFromServicesTests.cs (4)
39var response = await Client.SendAsync(request); 79var response = await Client.PutAsync( 95var response = await Client.PostAsync( 112var response = await Client.GetAsync("http://localhost/" + action);
CorsTests.cs (1)
21var response = await Client.SendAsync(request);
CorsTestsBase.cs (15)
48var response = await Client.SendAsync(request); 67var response = await Client.SendAsync(request); 85var response = await Client.SendAsync(request); 103var response = await Client.SendAsync(request); 127var response = await Client.SendAsync(request); 163var response = await Client.SendAsync(request); 196var response = await Client.SendAsync(request); 228var response = await Client.SendAsync(request); 253var response = await Client.SendAsync(request); 281var response = await Client.SendAsync(request); 306var response = await Client.SendAsync(request); 338var response = await Client.SendAsync(request); 377var response = await Client.SendAsync(request); 400var response = await Client.SendAsync(request); 420var response = await Client.SendAsync(request);
CustomValueProviderTest.cs (4)
46var response = await Client.SendAsync(request); 63var response = await Client.SendAsync(request); 80var response = await Client.SendAsync(request); 97var response = await Client.SendAsync(request);
DataAnnotationTests.cs (1)
43var response = await Client.GetAsync(EnumUrl);
DoNotRespectBrowserAcceptHeaderTests.cs (4)
47var response = await Client.SendAsync(request); 75var response = await Client.SendAsync(request); 104var response = await Client.SendAsync(request); 135var response = await Client.SendAsync(request);
ErrorPageTests.cs (6)
63var response = await client.GetAsync("http://localhost/" + action); 98var response = await Client.GetAsync(action); 119var response = await Client.GetAsync("http://localhost/ErrorFromViewImports"); 139var response = await Client.GetAsync("http://localhost/RuntimeError"); 157var response = await Client.GetAsync("http://localhost/LoaderException"); 176var response = await Client.GetAsync("http://localhost/AggregateException");
FileResultTests.cs (39)
39var response = await Client.GetAsync("http://localhost/DownloadFiles/DownloadFromDisk"); 63var response = await Client.SendAsync(httpRequestMessage); 85var response = await Client.SendAsync(httpRequestMessage); 105var response = await Client.SendAsync(httpRequestMessage); 127var response = await Client.SendAsync(httpRequestMessage); 149var response = await Client.SendAsync(httpRequestMessage); 169var response = await Client.SendAsync(httpRequestMessage); 186var response = await Client.GetAsync("http://localhost/DownloadFiles/DownloadFromDiskWithFileName"); 213var response = await Client.SendAsync(httpRequestMessage); 232var response = await Client.SendAsync(httpRequestMessage); 252var response = await Client.SendAsync(httpRequestMessage); 284var response = await Client.SendAsync(httpRequestMessage); 309var response = await Client.GetAsync("http://localhost/DownloadFiles/DownloadFromDiskSymlink"); 326var response = await Client.GetAsync("http://localhost/DownloadFiles/DownloadFromStream"); 350var response = await Client.SendAsync(httpRequestMessage); 372var response = await Client.SendAsync(httpRequestMessage); 392var response = await Client.SendAsync(httpRequestMessage); 407var response = await Client.GetAsync("http://localhost/DownloadFiles/DownloadFromStreamWithFileName"); 434var response = await Client.SendAsync(httpRequestMessage); 453var response = await Client.SendAsync(httpRequestMessage); 473var response = await Client.SendAsync(httpRequestMessage); 503var response = await Client.SendAsync(httpRequestMessage); 527var response = await Client.GetAsync("http://localhost/DownloadFiles/DownloadFromBinaryData"); 551var response = await Client.SendAsync(httpRequestMessage); 573var response = await Client.SendAsync(httpRequestMessage); 593var response = await Client.SendAsync(httpRequestMessage); 611var response = await Client.GetAsync("http://localhost/DownloadFiles/DownloadFromBinaryDataWithFileName"); 638var response = await Client.SendAsync(httpRequestMessage); 657var response = await Client.SendAsync(httpRequestMessage); 677var response = await Client.SendAsync(httpRequestMessage); 709var response = await Client.SendAsync(httpRequestMessage); 736var response = await Client.GetAsync("http://localhost/EmbeddedFiles/DownloadFileWithFileName"); 764var response = await Client.SendAsync(httpRequestMessage); 788var response = await Client.SendAsync(httpRequestMessage); 807var response = await Client.SendAsync(httpRequestMessage); 830var response = await Client.SendAsync(httpRequestMessage); 854var response = await Client.SendAsync(httpRequestMessage); 877var response = await Client.SendAsync(httpRequestMessage); 913var response = await Client.SendAsync(httpRequestMessage);
FiltersTest.cs (6)
36var response = await Client.GetAsync("AuthorizeUser/AdminRole"); 47var response = await Client.GetAsync("AuthorizeUser/ApiManagers"); 58var response = await Client.GetAsync("AuthorizeUser/Impossible"); 73var response = await Client.GetAsync($"{culture}/Filters/MiddlewareFilterTest"); 93var response = await Client.SendAsync(request); 120var response = await Client.GetAsync(url);
FormFileUploadTest.cs (2)
43var response = await Client.SendAsync(request); 71var response = await Client.SendAsync(request);
GlobalAuthorizationFilterTestBase.cs (3)
38var response = await Client.GetAsync("http://localhost/Administration/Index"); 52var response = await Client.GetAsync("http://localhost/Administration/AllowAnonymousAction"); 64var response = await Client.PostAsync("http://localhost/Administration/SignInCookie2", null);
HtmlGenerationTest.cs (9)
109var response = await Client.GetAsync("http://localhost/HtmlGeneration_Home/" + action); 135var response = await Client.GetAsync("HtmlGeneration_Home/image"); 226var response = await client.GetAsync("http://localhost/HtmlGeneration_Home/"); 266var response = await EncodedClient.GetAsync("http://localhost/HtmlGeneration_Home/" + action); 305var response = await Client.GetAsync("http://localhost/CheckViewData/" + action); 336var response = await Client.SendAsync(request); 353var response = await Client.SendAsync(request); 389var response = await Client.SendAsync(request); 793var response = await Client.SendAsync(request);
HttpActionResultTests.cs (2)
38var response = await Client.GetAsync(url); 52var response = await Client.GetAsync(url);
Infrastructure\HttpClientExtensions.cs (4)
16var response = await client.GetAsync(requestUri); 22public static async Task<IHtmlDocument> GetHtmlDocumentAsync(this HttpResponseMessage response) 35public static async Task<HttpResponseMessage> AssertStatusCodeAsync(this HttpResponseMessage response, HttpStatusCode expectedStatusCode)
InputFormatterTests.cs (18)
48var response = await Client.PostAsync("http://localhost/Home/Index", content); 64var response = await Client.PostAsync("http://localhost/InputFormatter/ReturnInput/", content); 81var response = await Client.PostAsync("http://localhost/InputFormatter/ReturnInput/", content); 91var response = await Client.GetAsync("PolymorphicBinding/ModelBound?DerivedProperty=Test"); 103var response = await Client.GetAsync("PolymorphicBinding/ModelBound"); 123var response = await Client.PostAsJsonAsync("PolymorphicBinding/InputFormatted", input); 135var response = await Client.PostAsJsonAsync("PolymorphicBinding/InputFormatted", string.Empty); 155var response = await Client.PostAsJsonAsync("PolymorphicPropertyBinding/Action", input); 167var response = await Client.PostAsJsonAsync("PolymorphicPropertyBinding/Action", string.Empty); 186var response = await Client.PostAsJsonAsync<object>($"Home/{nameof(HomeController.DefaultBody)}", value: null); 204var response = await Client.PostAsJsonAsync<object>($"Home/{nameof(HomeController.NonNullableBody)}", value: null); 231var response = await Client.PostAsync($"Home/{nameof(HomeController.DefaultBody)}", content); 241var response = await Client.PostAsJsonAsync<object>($"Home/{nameof(HomeController.OptionalBody)}", value: null); 251var response = await Client.PostAsJsonAsync<object>($"Home/{nameof(HomeController.DefaultValueBody)}", value: null); 261var response = await Client.PostAsJsonAsync<object>($"Home/{nameof(HomeController.NullableBody)}", value: null); 276var response = await Client.PostAsync($"Home/{nameof(HomeController.OptionalBody)}", content); 291var response = await Client.PostAsync($"Home/{nameof(HomeController.DefaultValueBody)}", content); 306var response = await Client.PostAsync($"Home/{nameof(HomeController.NullableBody)}", content);
InputObjectValidationTests.cs (13)
78var response = await Client.PostAsync("http://localhost/Validation/Index", content); 100var response = await Client.PostAsync("http://localhost/Validation/Index", content); 121var response = await Client.PostAsync("http://localhost/Validation/GetDeveloperName", content); 141var response = await Client.PostAsync("http://localhost/Validation/CreateProject", content); 167var response = await Client.PostAsync( 192var response = await Client.PostAsync("http://localhost/Validation/GetDeveloperAlias", content); 210var response = await Client.PostAsync( 230var response = await Client.PostAsync( 251var response = await Client.PostAsync( 274var response = await Client.SendAsync(requestMessage); 295var response = await Client.SendAsync(requestMessage); 324var response = await Client.SendAsync(requestMessage); 356var response = await Client.SendAsync(requestMessage);
InputParentValidationTests.cs (2)
51var response = await Client.PostAsync("http://localhost/Validation/CreateInvalidModel", content); 70var response = await Client.PostAsync("http://localhost/Validation/CreateInvalidModel", content);
InputValidationTests.cs (2)
50var response = await Client.PostAsync("http://localhost/TopLevelValidation", content); 85var response = await Client.PostAsync("http://localhost/TopLevelValidation", content);
JsonInputFormatterTestBase.cs (10)
50var response = await Client.PostAsync("http://localhost/Home/Index", content); 69var response = await Client.PostAsync("http://localhost/JsonFormatter/ReturnInput/", content); 87var response = await Client.PostAsync("http://localhost/JsonFormatter/ValueTypeAsBody/", content); 103var response = await Client.PostAsync("http://localhost/JsonFormatter/ValueTypeAsBody/", content); 123var response = await Client.PostAsJsonAsync("http://localhost/JsonFormatter/RoundtripSimpleModel/", expected); 140var response = await Client.PostAsJsonAsync("http://localhost/JsonFormatter/RoundtripRecordType/", expected); 157var response = await Client.PostAsJsonAsync($"JsonFormatter/{nameof(JsonFormatterController.RoundtripModelWithValidation)}", expected); 188var response = await Client.PostAsJsonAsync($"JsonFormatter/{nameof(JsonFormatterController.RoundtripModelWithValidation)}", expected); 207var response = await Client.PostAsync("http://localhost/JsonFormatter/ReturnInput/", content); 228var response = await Client.SendAsync(request);
JsonOutputFormatterTestBase.cs (11)
56var response = await Client.SendAsync(request); 81var response = await Client.GetAsync($"/JsonOutputFormatter/{nameof(JsonOutputFormatterController.IntResult)}"); 92var response = await Client.GetAsync($"/JsonOutputFormatter/{nameof(JsonOutputFormatterController.StringResult)}"); 103var response = await Client.GetAsync($"/JsonOutputFormatter/{nameof(JsonOutputFormatterController.StringWithUnicodeResult)}"); 114var response = await Client.GetAsync($"/JsonOutputFormatter/{nameof(JsonOutputFormatterController.StringWithNonAsciiContent)}"); 128var response = await Client.GetAsync($"/JsonOutputFormatter/{nameof(JsonOutputFormatterController.SimpleModelResult)}"); 142var response = await Client.GetAsync($"/JsonOutputFormatter/{nameof(JsonOutputFormatterController.CollectionModelResult)}"); 156var response = await Client.GetAsync($"/JsonOutputFormatter/{nameof(JsonOutputFormatterController.DictionaryResult)}"); 171var response = await Client.GetAsync($"/JsonOutputFormatter/{nameof(JsonOutputFormatterController.LargeObjectResult)}"); 184var response = await Client.GetAsync($"/JsonOutputFormatter/{nameof(JsonOutputFormatterController.ProblemDetailsResult)}"); 203var response = await Client.GetAsync($"/JsonOutputFormatter/{nameof(JsonOutputFormatterController.PolymorphicResult)}");
JsonPatchInputFormatterTest.cs (7)
41var response = await Client.SendAsync(request); 61var response = await Client.SendAsync(request); 81var response = await Client.SendAsync(request); 102var response = await Client.SendAsync(request); 123var response = await Client.SendAsync(request); 143var response = await Client.SendAsync(request); 157var response = await Client.SendAsync(request);
JsonResultWithNewtonsoftJsonTest.cs (6)
46var response = await Client.SendAsync(request); 68var response = await Client.SendAsync(request); 86var response = await Client.SendAsync(request); 104var response = await Client.SendAsync(request); 121var response = await Client.SendAsync(request); 137var response = await Client.SendAsync(request);
JsonResultWithSystemTextJsonTest.cs (6)
46var response = await Client.SendAsync(request); 68var response = await Client.SendAsync(request); 86var response = await Client.SendAsync(request); 104var response = await Client.SendAsync(request); 121var response = await Client.SendAsync(request); 137var response = await Client.SendAsync(request);
KeyedServicesTests.cs (6)
37var okResponse = await Client.SendAsync(okRequest); 38var notokResponse = await Client.SendAsync(notokRequest); 54var response = await Client.SendAsync(request); 68var response = await Client.SendAsync(request); 82var response = await Client.SendAsync(request); 96var response = await Client.SendAsync(request);
LinkGenerationTests.cs (2)
61var response = await Client.GetAsync(url); 83var response = await Client.GetAsync("http://localhost/Home/ActionLinkView");
LinkGeneratorTest.cs (18)
41var response = await Client.GetAsync("LG1/LinkToSelf"); 53var response = await Client.GetAsync("LG1/LinkToSelf/17?another-value=5"); 65var response = await Client.GetAsync("LG1/LinkToAnotherAction/17?another-value=5"); 77var response = await Client.GetAsync("LG1/LinkToAnotherController/17?another-value=5"); 89var response = await Client.GetAsync("LG1/LinkToAnArea/17?another-value=5"); 101var response = await Client.GetAsync("Admin/LG3/LinkInsideOfArea/17"); 115var response = await Client.GetAsync("Admin/LG3/LinkInsideOfAreaFail/17?another-value=5"); 127var response = await Client.GetAsync("Admin/LG3/LinkOutsideOfArea/17?another-value=5"); 139var response = await Client.GetAsync("LGAnotherPage/17"); 151var response = await Client.GetAsync("LGPage/17"); 163var response = await Client.GetAsync("LG1/LinkToPage/17?another-value=4"); 175var response = await Client.GetAsync("LG1/LinkToPageWithTransformedPath?id=HelloWorld"); 187var response = await Client.GetAsync("LG1/LinkToPageInArea/17?another-value=4"); 199var response = await Client.GetAsync("LG1/LinkWithFullUri/17"); 211var response = await Client.GetAsync("LG1/LinkWithFullUriWithoutHttpContext/17"); 223var response = await Client.GetAsync("LG1/LinkToPageWithFullUri/17"); 235var response = await Client.GetAsync("LG1/LinkToPageWithFullUriWithoutHttpContext/17"); 247var response = await Client.GetAsync("LG1/LinkToRouteWithNoMvcParameters?custom=17");
LinkParserTest.cs (2)
41var response = await Client.GetAsync("LinkParser/Index/18"); 71var response = await Client.GetAsync("LinkParser/Another?path=%2Fsome-path%2Fa%2Fb%2Fc");
MvcSandboxTest.cs (2)
34var response = await Client.GetAsync("http://localhost"); 44var response = await Client.GetAsync("http://localhost/PagesHome");
NewtonsoftJsonInputFormatterTest.cs (3)
19var response = await Client.PostAsync("http://localhost/JsonFormatter/ReturnInput/", content); 38var response = await Client.PostAsync("http://localhost/JsonFormatter/ReturnNonNullableInput/", content); 55var response = await Client.PostAsync("http://localhost/JsonFormatter/ReturnInput/", content);
NewtonsoftJsonOutputFormatterTest.cs (2)
31var response = await Client.GetAsync("http://localhost/JsonFormatter/ReturnsIndentedJson"); 43var response = await Client.GetAsync($"/JsonOutputFormatter/{nameof(JsonOutputFormatterController.SimpleModelResult)}");
NonNullableReferenceTypesTest.cs (3)
38var response = await Client.GetAsync("http://localhost/NonNullable"); 80var response = await Client.GetAsync("http://localhost/NonNullable"); 116var response = await Client.GetAsync("http://localhost/api/NonNullable");
OutputFormatterTest.cs (5)
43var response = await Client.GetAsync("http://localhost/TextPlain/" + actionName); 60var response = await Client.GetAsync("http://localhost/TextPlain/" + actionName); 72var response = await Client.GetAsync("http://localhost/NoContent/" + actionName); 90var response = await Client.GetAsync("http://localhost/NoContent/" + actionName); 109var response = await Client.GetAsync("http://localhost/NoContentDoNotTreatNullValueAsNoContent/" +
PageAsyncDisposalTest.cs (1)
43var response = await Client.GetAsync("http://localhost/AsyncDisposable");
RazorBuildTest.cs (6)
56var response = await Client.GetAsync("http://localhost/Rzc/Page"); 69var response = await Client.GetAsync("Fallback"); 81var response = await Client.GetAsync("http://localhost/Rzc/View"); 94var response = await Client.GetAsync("http://localhost/Common/View"); 180var response = await Client.PostAsync($"/UpdateableViews/Update", updateContent); 186var response = await Client.PostAsync($"/UpdateableViews/UpdateRazorPages", new StringContent(string.Empty));
RazorPageModelTest.cs (7)
51var response = await Client.SendAsync(request); 76var response = await Client.SendAsync(request); 101var response = await Client.SendAsync(request); 127var response = await Client.SendAsync(request); 152var response = await Client.SendAsync(request); 177var response = await Client.SendAsync(request); 189var getResponse = await Client.GetAsync(request.RequestUri);
RazorPagesTest.cs (65)
51var response = await Client.GetAsync("http://localhost/SimpleForms"); 96var getResponse = await Client.GetAsync("http://localhost/HandlerTestPage"); 106var response = await Client.SendAsync(postRequest); 128var getResponse = await Client.GetAsync("http://localhost/HandlerTestPage"); 137var response = await Client.SendAsync(postRequest); 209var getResponse = await Client.GetAsync("http://localhost/ModelHandlerTestPage"); 219var response = await Client.SendAsync(postRequest); 241var getResponse = await Client.GetAsync("http://localhost/ModelHandlerTestPage"); 250var response = await Client.SendAsync(postRequest); 275var routeResponse = await Client.SendAsync(routeRequest); 288var routeResponse = await Client.SendAsync(routeRequest); 304var response = await Client.SendAsync(request); 320var response = await Client.SendAsync(request); 336var response = await Client.SendAsync(request); 349var response = await Client.SendAsync(request); 365var response = await Client.SendAsync(request); 381var response = await Client.SendAsync(request); 397var response = await Client.SendAsync(request); 411var getResponse = await Client.SendAsync(getRequest); 421var response = await Client.SendAsync(postRequest); 440var response = await Client.SendAsync(request); 469var response = await Client.SendAsync(request); 485var response = await Client.SendAsync(request); 502var response = await Client.SendAsync(request); 527var response = await Client.SendAsync(request); 552var response = await Client.SendAsync(request); 574var getResponse = await Client.SendAsync(getRequest); 585var response = await Client.SendAsync(request); 614var response = await Client.GetAsync(url); 628var response = await Client.GetAsync(url); 682var response = await Client.SendAsync(request); 710var response = await Client.SendAsync(request); 737var response = await Client.SendAsync(request); 768var response = await Client.SendAsync(request); 797var response = await Client.SendAsync(request); 822var response = await Client.SendAsync(request); 853var response = await Client.SendAsync(request); 877var response = await Client.SendAsync(request); 893var response = await Client.SendAsync(request); 909var response = await Client.SendAsync(request); 926var response = await Client.SendAsync(request); 957var response = await Client.GetAsync("/Pages/Redirects/RedirectFromPage"); 971var response = await Client.GetAsync("/Pages/Redirects/RedirectFromModel"); 993var response = await Client.SendAsync(request); 1007var response = await Client.GetAsync("/Pages/Redirects/RedirectFromHandler/RedirectToPage/10"); 1021var response = await Client.GetAsync("/Pages/Redirects/RedirectFromHandler/RedirectToAnotherHandler/11"); 1035var response = await Client.GetAsync("/RedirectToPage"); 1049var response = await Client.GetAsync("/RedirectToController"); 1061var response = await Client.GetAsync("/Pages/Redirects/RedirectToSibling/RedirectToRedirect"); 1073var response = await Client.GetAsync("/Pages/Redirects/RedirectToSibling/RedirectToIndex"); 1085var response = await Client.GetAsync("/Pages/Redirects/RedirectToSibling/RedirectToSubDir"); 1099var response = await Client.GetAsync("/Pages/Redirects/RedirectToSibling/RedirectToDotSlash"); 1111var response = await Client.GetAsync("/Pages/Redirects/RedirectToSibling/RedirectToParent"); 1210var response = await Client.GetAsync("/Pages/ModelWithAuthFilter"); 1221var response = await Client.PostAsync("/Pages/Admin/Edit", new StringContent("")); 1248var response = await Client.GetAsync("/ModelWithResponseCache"); 1298var response = await Client.SendAsync(request); 1313var response = await Client.GetAsync(url); 1339var response = await Client.SendAsync(request); 1384var response = await Client.GetAsync("/ModelAsFilter/TestResultFilter"); 1458var response = await Client.SendAsync(request); 1474var response = await Client.SendAsync(request); 1490var response = await Client.SendAsync(request); 1501var getResponse = await Client.GetAsync(request.RequestUri); 1511private static string GetCookie(HttpResponseMessage response)
RazorPagesWithBasePathTest.cs (27)
35var response = await Client.GetAsync("/HelloWorld"); 45var response = await Client.GetAsync("/"); 58var response = await Client.GetAsync("/Index"); 71var response = await Client.GetAsync("/Admin/Index"); 84var response = await Client.GetAsync("/Admin/RouteTemplate/1/MyRouteSuffix/"); 97var response = await Client.GetAsync("/Admin/RouteTemplate/my-user-id/MyRouteSuffix/4"); 110var response = await Client.GetAsync("/Conventions/Auth"); 121var response = await Client.GetAsync("/Conventions/AuthFolder"); 256var response = await Client.GetAsync("/Redirects/Index"); 270var response = await Client.GetAsync("/Redirects/RedirectToIndex"); 389var response = await Client.GetAsync("/Accounts/RequiresAuth"); 416var response = await Client.GetAsync("/CustomModelTypeModel"); 428var getPage = await Client.GetAsync("/CustomModelTypeModel"); 445var response = await Client.SendAsync(message); 457var getPage = await Client.GetAsync("/CustomModelTypeModel?Attempts=0"); 474var response = await Client.SendAsync(message); 485var getPage = await Client.GetAsync("/CustomModelTypeModel?Attempts=0"); 502var response = await Client.SendAsync(message); 619var response = await Client.SendAsync(request); 632var response = await Client.SendAsync(request); 646var response = await Client.SendAsync(request); 660var response = await Client.SendAsync(request); 687var response = await Client.GetAsync(url); 723using var response = await Client.GetAsync("/Filters/AuthFilterOnPage"); 734using var response = await Client.GetAsync("/Filters/AuthFilterOnPageWithModel"); 745using var response = await Client.GetAsync("/Filters/FiltersAppliedToPageAndPageModel"); 755var response = await Client.GetAsync(request.RequestUri);
RazorPagesWithEndpointRoutingTest.cs (4)
34var response = await Client.GetAsync("/Conventions/AuthFolder"); 45var response = await Client.GetAsync("/Conventions/AuthFolder/AnonymousViaModel"); 58var response = await Client.GetAsync("/ModelWithAuthFilter"); 69var response = await Client.GetAsync("/AuthorizedAction/Index");
RazorRuntimeCompilationHostingStartupTest.cs (2)
125var response = await Client.PostAsync($"/UpdateableViews/Update", updateContent); 131var response = await Client.PostAsync($"/UpdateableViews/UpdateRazorPages", new StringContent(string.Empty));
ReadFromDisconnectedClientTest.cs (2)
45var response = await Client.SendAsync(request); 62var response = await Client.SendAsync(request);
RemoteAttributeValidationTest.cs (3)
45var response = await Client.GetAsync(url); 70var response = await Client.GetAsync(url); 99var response = await Client.PostAsync(url, content);
RequestFormLimitsTest.cs (6)
48var response = await Client.PostAsync( 69var response = await Client.PostAsync( 95var response = await Client.PostAsync( 118var response = await Client.PostAsync( 144var response = await Client.PostAsync( 165var response = await Client.PostAsync(
RequestServicesEndpointRoutingTest.cs (1)
15var response = await Client.GetAsync("http://localhost/Routing/HasEndpointMatch");
RequestServicesTest.cs (1)
15var response = await Client.GetAsync("http://localhost/Routing/HasEndpointMatch");
RequestServicesTestBase.cs (4)
57var response = await Client.SendAsync(request); 79var response = await Client.SendAsync(request); 99var response1 = await Client.SendAsync(request1); 108var response2 = await Client.SendAsync(request2);
RequestSizeLimitTest.cs (3)
46var response = await Client.PostAsync( 68var response = await Client.PostAsync( 87var response = await Client.SendAsync(request);
RespectBrowserAcceptHeaderTests.cs (2)
47var response = await Client.SendAsync(request); 66var response = await Client.SendAsync(request);
RoutingAcrossPipelineBranchesTest.cs (12)
47var subdirResponse = await client.SendAsync(subdirRequest); 50var commonResponse = await client.SendAsync(commonRequest); 53var defaultResponse = await client.SendAsync(defaultRequest); 82var subdirResponse = await client.SendAsync(subdirRequest); 85var commonResponse = await client.SendAsync(commonRequest); 88var defaultResponse = await client.SendAsync(defaultRequest); 115var subdirResponse = await client.SendAsync(subdirRequest); 118var defaultResponse = await client.SendAsync(defaultRequest); 145var commonResponse = await client.SendAsync(commonRequest); 147var subdirResponse = await client.SendAsync(subdirRequest); 149var defaultResponse = await client.SendAsync(defaultRequest); 166var response = await client.SendAsync(request);
RoutingDynamicOrderTest.cs (6)
47var response = await client.SendAsync(request); 69var response = await client.SendAsync(request); 92var response = await client.SendAsync(request); 114var response = await client.SendAsync(request); 136var response = await client.SendAsync(request); 158var response = await client.SendAsync(request);
RoutingDynamicTest.cs (9)
43var response = await Client.SendAsync(request); 58var response = await Client.SendAsync(request); 73var response = await Client.SendAsync(request); 89var response = await Client.SendAsync(request); 103var response = await Client.SendAsync(request); 119var response = await Client.SendAsync(request); 135var response = await Client.SendAsync(request); 151var response = await client.GetAsync(url); 168var response = await client.GetAsync(url);
RoutingEndpointRoutingTest.cs (27)
16var response = await Client.GetAsync("http://localhost/PageRoute/Attribute/pagevalue"); 37var response = await Client.GetAsync("http://localhost/parameter-transformer/my-action"); 53var response = await Client.GetAsync("http://localhost/ParameterTransformer/MyAction"); 63var response = await Client.GetAsync("http://localhost/EndpointRouting/Index"); 79var response = await Client.GetAsync("http://localhost/EndpointRouting"); 95var response = await Client.GetAsync("http://localhost/endpoint-routing/ParameterTransformer"); 111var response = await Client.GetAsync("http://localhost/EndpointRouting/ParameterTransformer"); 124var response = await Client.GetAsync(url); 144var response = await Client.GetAsync(url); 164var response = await Client.GetAsync(url); 184var response = await Client.GetAsync(url); 201var response = await Client.GetAsync("http://localhost/Routing/HasEndpointMatch"); 216var response = await Client.GetAsync("http://localhost/RouteData/Conventional"); 233var response = await Client.GetAsync("http://localhost/RouteData/Attribute"); 251var response = await Client.GetAsync("http://localhost/Travel/Flight/BuyTickets"); 261var response = await Client.GetAsync("http://localhost/ConventionalTransformerRoute/conventional-transformer/Index"); 276var response = await Client.GetAsync("http://localhost/ConventionalTransformerRoute/ConventionalTransformer/Index"); 286var response = await Client.GetAsync("http://localhost/ConventionalTransformerRoute/conventional-transformer"); 301var response = await Client.GetAsync("http://localhost/ConventionalTransformerRoute/conventional-transformer/Param/my-value"); 321var response = await Client.GetAsync(url); 340var response = await Client.GetAsync(url); 359var response = await Client.GetAsync(url); 377var response = await Client.GetAsync("/EndpointName/LinkToConventionalRouted"); 392var response = await Client.GetAsync("/EndpointName/LinkToConventionalRouted/test"); 407var response = await Client.GetAsync("/EndpointName/LinkToAttributeRouted"); 422var response = await Client.GetAsync("/EndpointName/LinkToAttributeRouted/test"); 432protected override void AssertCorsRejectionStatusCode(HttpResponseMessage response)
RoutingFallbackTest.cs (7)
44var response = await Client.SendAsync(request); 59var response = await Client.SendAsync(request); 75var response = await Client.SendAsync(request); 91var response = await Client.SendAsync(request); 107var response = await Client.SendAsync(request); 123var response = await Client.SendAsync(request); 142var response = await Client.SendAsync(request);
RoutingGroupsTest.cs (2)
42var response = await client.GetAsync("controllers/contoso/Blog/ShowPosts"); 55var response = await client.GetAsync("pages/PageWithLinks");
RoutingGroupsWithMetadataTest.cs (1)
40var response = await client.GetAsync("group1/metadata");
RoutingTests.cs (4)
17var response = await Client.GetAsync("http://localhost/Routing/HasEndpointMatch"); 36var response = await Client.SendAsync(new HttpRequestMessage(new HttpMethod("POST"), url)); 46var response = await Client.GetAsync("http://localhost/RouteData/Conventional"); 68var response = await Client.GetAsync("http://localhost/RouteData/Attribute");
RoutingTestsBase.cs (74)
44var response = await Client.GetAsync(requestUrl); 62var response = await Client.GetAsync("http://localhost/NonParameterConstraintRoute/NonParameterConstraint/Index?allowed=true"); 78var response = await Client.GetAsync("http://localhost/NonParameterConstraintRoute/NonParameterConstraint/Index?allowed=false"); 88var response = await Client.GetAsync("http://localhost/PageRoute/ConventionalRoute/pagevalue"); 111var response = await Client.GetAsync(url); 131var response = await Client.GetAsync(url); 161var response = await Client.GetAsync("http://localhost/RouteData/DataTokens"); 193var response = await Client.GetAsync("http://localhost/DataTokensRoute/DataTokens/Index"); 205var response = await Client.GetAsync("http://localhost/DataTokens/Index"); 217var response = await Client.GetAsync("http://localhost/page-route-transformer/index"); 227var response = await Client.GetAsync("http://localhost/page-route-transformer"); 237var response = await Client.GetAsync("http://localhost/page-route-transformer/test-page/ExtraPath/World"); 249var response = await Client.GetAsync("http://localhost/PageRouteTransformer/NewConventionRoute/World"); 261var response = await Client.GetAsync("http://localhost/Home/Index"); 285var response = await Client.GetAsync("http://localhost/"); 309var response = await Client.GetAsync("http://localhost/Home/NotAnAction"); 319var response = await Client.GetAsync("http://localhost/Travel/Flight/Index"); 344var response = await Client.GetAsync("http://localhost/Travel/Flight/BuyTickets"); 356var response = await Client.GetAsync("http://localhost/Home/OptionalPath/" + optionalSegment); 371var response = await Client.GetAsync("http://localhost/Store/Shop/Products"); 404var response = await Client.SendAsync(request); 457var response = await Client.SendAsync(request); 469var response = await Client.GetAsync(url); 496var response = await Client.SendAsync(new HttpRequestMessage(HttpMethod.Post, url)); 522var response = await Client.SendAsync(new HttpRequestMessage(new HttpMethod("POST"), url)); 538var response = await Client.SendAsync(new HttpRequestMessage(new HttpMethod(method), url)); 566var response = await Client.GetAsync(url); 609var response = await Client.SendAsync(new HttpRequestMessage(new HttpMethod(method), url)); 620var response = await Client.GetAsync("http://localhost/Store/ListProducts"); 632var response = await Client.GetAsync("http://localhost/Home/About"); 649var response = await Client.GetAsync("http://localhost/Blog/Edit/5"); 679var response = await Client.GetAsync("http://localhost/api/Employee"); 706var response = await Client.SendAsync(message); 731var response = await Client.SendAsync(message); 751var response = await Client.SendAsync(message); 774var response = await Client.SendAsync(message); 796var response = await Client.SendAsync(message); 821var response = await Client.SendAsync(message); 841var response = await Client.SendAsync(message); 864var response = await Client.SendAsync(message); 885var response = await Client.GetAsync("http://localhost/Manager/5"); 906var response = await Client.GetAsync("http://localhost/Team/5"); 927var response = await Client.GetAsync("http://localhost/Teams"); 983var response = await Client.GetAsync(url); 1003var response = await Client.GetAsync(url); 1023var response = await Client.GetAsync(url); 1043var response = await Client.GetAsync(url); 1067var response = await Client.SendAsync(message); 1085var response = await Client.DeleteAsync("http://localhost/api/Company/5"); 1107var response = await Client.GetAsync("http://localhost/api/Company/5/Employees"); 1125var response = await Client.GetAsync("http://localhost/api/Company/5/Departments"); 1147var response = await Client.GetAsync(url); 1168var response = await Client.GetAsync(url); 1189var response = await Client.GetAsync(url); 1211var response = await Client.GetAsync(url); 1233var response = await Client.GetAsync(url); 1255var response = await Client.GetAsync(url); 1277var response = await Client.GetAsync(url); 1297var response = await Client.GetAsync(url); 1318var response = await Client.GetAsync(url); 1339var response = await Client.GetAsync(url); 1359var response = await Client.GetAsync(url); 1380var response = await Client.GetAsync(url); 1401var response = await Client.GetAsync(url); 1422var response = await Client.GetAsync(url); 1443var response = await Client.GetAsync(url); 1464var response = await Client.GetAsync(url); 1489var response = await Client.SendAsync(request); 1524var response = await Client.SendAsync(request); 1541var response = await Client.SendAsync(request); 1558var response = await Client.GetAsync("http://localhost/PageWithLinks"); 1576var response = await Client.GetAsync("/afterrouting"); 1588var response = await Client.GetAsync("/PageParameter/LinkToPageParameter"); 1601protected virtual void AssertCorsRejectionStatusCode(HttpResponseMessage response)
RoutingWithoutRazorPagesTestsBase.cs (2)
40var response = await Client.GetAsync("http://localhost/PageRoute/Attribute/pagevalue"); 61var response = await Client.GetAsync("http://localhost/PageRoute/ConventionalRoute/pagevalue");
SerializableErrorTests.cs (4)
55var response = await Client.SendAsync(request); 79var response = await Client.SendAsync(request); 125var response = await Client.SendAsync(request); 166var response = await Client.SendAsync(request);
SimpleWithWebApplicationBuilderTests.cs (11)
59var response = await Client.GetAsync("/json"); 74var response = await Client.GetAsync("/ok-object"); 89var response = await Client.GetAsync("/accepted-object"); 104var response = await Client.GetAsync("/many-results?id=-1"); 116var response = await Client.GetAsync("/many-results?id=7"); 129var response = await Client.GetAsync("/greet"); 222var response = await Client.PostAsJsonAsync("accepts-default", new { name = "Test" }); 237var response = await Client.SendAsync(request); 252var response = await Client.SendAsync(request); 273var response = await Client.PostAsync("/fileupload", content); 289var response = await Client.PostAsync("/fileupload", content);
StreamOutputFormatterTest.cs (1)
38var response = await Client.GetAsync("http://localhost/Stream/" + actionName);
SystemTextJsonOutputFormatterTest.cs (4)
20var response = await Client.GetAsync($"/JsonOutputFormatter/{nameof(JsonOutputFormatterController.StringWithUnicodeResult)}"); 39var response = await client.GetAsync($"/JsonOutputFormatter/{nameof(JsonOutputFormatterController.StringWithNonAsciiContent)}"); 62var response = await Client.GetAsync($"/SystemTextJsonOutputFormatter/{nameof(SystemTextJsonOutputFormatterController.PolymorphicResult)}"); 77var response = await Client.GetAsync($"/SystemTextJsonOutputFormatter/{nameof(SystemTextJsonOutputFormatterController.AsyncEnumerable)}");
TagHelperComponentTagHelperTest.cs (3)
43var response = await Client.SendAsync(request); 63var response = await Client.SendAsync(request); 83var response = await Client.SendAsync(request);
TagHelpersFromServicesTest.cs (1)
37var response = await Client.SendAsync(request);
TagHelpersTest.cs (7)
58var response = await Client.GetAsync("http://localhost/Home/" + action); 95var response = await EncodedClient.GetAsync("http://localhost/Home/UnboundDynamicAttributes"); 115var response = await Client.GetAsync("http://localhost/Employee/DuplicateAntiforgeryTokenRegistration"); 213var response = await Client.GetAsync("http://localhost/Employee/Create"); 241var response = await Client.PostAsync("http://localhost/Employee/Create", postContent); 269var response = await Client.PostAsync("http://localhost/Employee/Create", postContent); 292var response = await Client.GetAsync($"/Encoders/{ actionName }");
TempDataInCookiesTest.cs (4)
65var response = await Client.GetAsync($"/TempData/SetLargeValueInTempData?size={size}&character={character}"); 124var response = await Client.PostAsync("/TempData/SetTempData", content); 139var redirectResponse = await Client.SendAsync(GetRequest("/TempData/GetTempDataAndRedirect", response)); 177var response = await Client.PostAsync($"{protocol}://localhost/TempData/SetTempData", content);
TempDataInCookiesUsingCookieConsentTest.cs (5)
46var response = await Client.GetAsync("/TempData/GrantConsent"); 80var response = await Client.PostAsync("/TempData/SetTempData", content); 92private HttpRequestMessage GetRequest(string path, HttpResponseMessage response) 99private HttpRequestMessage GetPostRequest(string path, HttpContent content, HttpResponseMessage response) 107private void SetCookieHeaders(HttpRequestMessage request, HttpResponseMessage response)
TempDataPropertyTest.cs (7)
45var redirectResponse = await Client.PostAsync("TempDataProperty/CreateForView", content); 51var response = await Client.SendAsync(GetRequest(redirectResponse.Headers.Location.ToString(), redirectResponse)); 73var redirectResponse = await Client.PostAsync("TempDataProperty/Create", content); 79var response = await Client.SendAsync(GetRequest(redirectResponse.Headers.Location.ToString(), redirectResponse)); 102var response = await Client.PostAsync("TempDataProperty/CreateNoRedirect", content); 139var response = await Client.PostAsync("TempDataProperty/CreateNoRedirect", content); 160private HttpRequestMessage GetRequest(string path, HttpResponseMessage response)
TempDataTestBase.cs (14)
46var response = await Client.PostAsync("/TempData/SetTempData", content); 77var response = await Client.PostAsync("/TempData/DisplayTempData", content); 96var response = await Client.PostAsync("/TempData/SetTempData", content); 102var redirectResponse = await Client.SendAsync(GetRequest("/TempData/GetTempDataAndRedirect", response)); 127var response = await Client.PostAsync("/TempData/SetTempData", content); 133var peekResponse = await Client.SendAsync(GetRequest("/TempData/PeekTempData", response)); 141var getResponse = await Client.SendAsync(GetRequest("/TempData/GetTempData", response)); 167var redirectResponse = await Client.PostAsync("/TempData/SetTempDataMultiple", content); 173var response = await Client.SendAsync(GetRequest(redirectResponse.Headers.Location.ToString(), redirectResponse)); 192var response = await Client.GetAsync("/TempData/SetTempDataResponseWrite"); 206var response = await Client.GetAsync("/TempData/SetTempDataInActionResult"); 230var response = await Client.GetAsync("/TempData/UnhandledExceptionAndSettingTempData"); 248var response = await Client.GetAsync("/TempData/UnhandledExceptionAndSettingTempData?handleException=true"); 262public HttpRequestMessage GetRequest(string path, HttpResponseMessage response)
TestingInfrastructureTests.cs (11)
61var response = await Client.SendAsync(request); 84var response = await Client.SendAsync(request); 103var response = await client.SendAsync(request); 119var response = await client.SendAsync(request); 133var response = await client.SendAsync(request); 146var response = await client.SendAsync(request); 157var acquireToken = await Client.GetAsync("Testing/AntiforgerySimulator/3"); 160var response = await Client.PostAsync( 175var response = await Client.PutAsync("Testing/Put/3", content: null); 238var response = await client.SendAsync(request); 272protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
UrlResolutionTest.cs (2)
47var response = await Client.GetAsync("http://localhost/UrlResolution/Index"); 64var response = await EncodedClient.GetAsync("http://localhost/UrlResolution/Index");
VersioningEndpointRoutingTests.cs (3)
16var response = await Client.GetAsync("http://localhost/Routing/HasEndpointMatch"); 37var response = await Client.SendAsync(message); 56var response = await Client.SendAsync(message);
VersioningTests.cs (1)
15var response = await Client.GetAsync("http://localhost/Routing/HasEndpointMatch");
VersioningTestsBase.cs (24)
48var response = await Client.SendAsync(message); 72var response = await Client.SendAsync(message); 92var response = await Client.SendAsync(message); 113var response = await Client.SendAsync(message); 132var response = await Client.SendAsync(message); 151var response = await Client.SendAsync(message); 178var response = await Client.SendAsync(message); 202var response = await Client.SendAsync(message); 227var response = await Client.SendAsync(message); 253var response = await Client.SendAsync(message); 272var response = await Client.SendAsync(message); 294var response = await Client.SendAsync(message); 315var response = await Client.SendAsync(message); 336var response = await Client.SendAsync(message); 358var response = await Client.SendAsync(message); 379var response = await Client.SendAsync(message); 398var response = await Client.SendAsync(message); 420var response = await Client.SendAsync(message); 441var response = await Client.SendAsync(message); 462var response = await Client.SendAsync(message); 486var response = await Client.SendAsync(message); 505var response = await Client.SendAsync(message); 524var response = await Client.SendAsync(message); 546var response = await Client.SendAsync(message);
ViewComponentFromServicesTests.cs (1)
38var response = await Client.SendAsync(request);
ViewEngineTests.cs (5)
78var response = await Client.GetAsync("http://localhost/ViewEngine/" + actionName); 168var response = await Client.SendAsync(request); 255var response = await Client.GetAsync("http://localhost/PartialViewEngine/" + actionName); 312var response = await Client.SendAsync(request); 428var response = await Client.GetAsync("http://localhost/PartialsWithLayout/PartialsRenderedViaPartial");
XmlDataContractSerializerFormattersWrappingTest.cs (12)
48var response = await Client.SendAsync(request); 72var response = await Client.SendAsync(request); 96var response = await Client.SendAsync(request); 119var response = await Client.SendAsync(request); 142var response = await Client.SendAsync(request); 167var response = await Client.SendAsync(request); 190var response = await Client.SendAsync(request); 211var response = await Client.SendAsync(request); 232var response = await Client.GetAsync("/api/XmlDataContractApi/ActionReturningClientErrorStatusCodeResult"); 259var response = await Client.GetAsync("/api/XmlDataContractApi/ActionReturningProblemDetails"); 274var response = await Client.GetAsync("/api/XmlDataContractApi/ActionReturningValidationProblem"); 307var response = await Client.GetAsync("/api/XmlDataContractApi/ActionReturningValidationDetailsWithMetadata");
XmlDataContractSerializerInputFormatterTest.cs (3)
43var response = await Client.PostAsync("http://localhost/Home/Index", content); 63var response = await Client.SendAsync(request); 94var response = await Client.SendAsync(request);
XmlOutputFormatterTests.cs (10)
46var response = await Client.SendAsync(request); 68var response = await Client.SendAsync(request); 91var response = await Client.SendAsync(request); 112var response = await Client.SendAsync(request); 135var response = await Client.SendAsync(request); 156var response = await Client.SendAsync(request); 174var response = await Client.SendAsync(request); 194var response = await Client.SendAsync(request); 214var response = await Client.SendAsync(request); 235var response = await Client.SendAsync(request);
XmlSerializerFormattersWrappingTest.cs (12)
47var response = await Client.SendAsync(request); 68var response = await Client.SendAsync(request); 89var response = await Client.SendAsync(request); 109var response = await Client.SendAsync(request); 129var response = await Client.SendAsync(request); 151var response = await Client.SendAsync(request); 171var response = await Client.SendAsync(request); 189var response = await Client.SendAsync(request); 215var response = await Client.GetAsync("/api/XmlSerializerApi/ActionReturningClientErrorStatusCodeResult"); 242var response = await Client.GetAsync("/api/XmlSerializerApi/ActionReturningProblemDetails"); 257var response = await Client.GetAsync("/api/XmlSerializerApi/ActionReturningValidationProblem"); 289var response = await Client.GetAsync("/api/XmlSerializerApi/ActionReturningValidationDetailsWithMetadata");
XmlSerializerInputFormatterTests.cs (2)
44var response = await Client.PostAsync("http://localhost/Home/Index", content); 61var response = await Client.PostAsync("http://localhost/Home/Index", content);
Microsoft.AspNetCore.Mvc.Testing (8)
Handlers\CookieContainerHandler.cs (3)
12/// more pairs of <see cref="HttpRequestMessage"/> and <see cref="HttpResponseMessage"/>. 41protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 50var response = await base.SendAsync(request, cancellationToken);
Handlers\RedirectHandler.cs (5)
45protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 51var response = await base.SendAsync(request, cancellationToken); 133HttpResponseMessage response, 167private static bool ShouldKeepVerb(HttpResponseMessage response) => 171private static bool IsRedirect(HttpResponseMessage response) =>
Microsoft.AspNetCore.OutputCaching.Tests (89)
OutputCacheTests.cs (89)
29var initialResponse = await client.SendAsync(TestUtils.CreateRequest(method, "")); 30var subsequentResponse = await client.SendAsync(TestUtils.CreateRequest(method, "")); 51var initialResponse = await client.SendAsync(TestUtils.CreateRequest(method, "")); 52var subsequentResponse = await client.SendAsync(TestUtils.CreateRequest(method, "different")); 71var initialResponse = await client.PostAsync("", new StringContent(string.Empty)); 72var subsequentResponse = await client.PostAsync("", new StringContent(string.Empty)); 91var subsequentResponse = await client.SendAsync(new HttpRequestMessage(HttpMethod.Head, "")); 92var initialResponse = await client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "")); 111var initialResponse = await client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "")); 112var subsequentResponse = await client.SendAsync(new HttpRequestMessage(HttpMethod.Head, "")); 134var initialResponse = await client.SendAsync(TestUtils.CreateRequest(method, "")); 137var cachedResponse = await client.SendAsync(TestUtils.CreateRequest(method, "")); 143var subsequentResponse = await client.SendAsync(TestUtils.CreateRequest(method, "")); 165var initialResponse = await client.SendAsync(TestUtils.CreateRequest(method, "")); 168var cachedResponse = await client.SendAsync(TestUtils.CreateRequest(method, "")); 174var subsequentResponse = await client.SendAsync(TestUtils.CreateRequest(method, "")); 195var initialResponse = await client.SendAsync(TestUtils.CreateRequest(method, "path")); 196var subsequentResponse = await client.SendAsync(TestUtils.CreateRequest(method, "PATH")); 218var initialResponse = await client.SendAsync(TestUtils.CreateRequest(method, "path")); 219var subsequentResponse = await client.SendAsync(TestUtils.CreateRequest(method, "PATH")); 245var initialResponse = await client.SendAsync(TestUtils.CreateRequest(method, "")); 247var subsequentResponse = await client.SendAsync(TestUtils.CreateRequest(method, "")); 269var initialResponse = await client.SendAsync(TestUtils.CreateRequest(method, "")); 270var subsequentResponse = await client.SendAsync(TestUtils.CreateRequest(method, "")); 297var initialResponse = await client.SendAsync(TestUtils.CreateRequest(method, "")); 298var subsequentResponse = await client.SendAsync(TestUtils.CreateRequest(method, "")); 318var initialResponse = await client.GetAsync(""); 319var subsequentResponse = await client.GetAsync(""); 342var initialResponse = await client.GetAsync(""); 344var subsequentResponse = await client.GetAsync(""); 366var initialResponse = await client.GetAsync("?query=value"); 367var subsequentResponse = await client.GetAsync("?query=value"); 389var initialResponse = await client.GetAsync("?querya=valuea&queryb=valueb"); 390var subsequentResponse = await client.GetAsync("?QueryA=valuea&QueryB=valueb"); 412var initialResponse = await client.GetAsync("?querya=valuea&queryb=valueb"); 413var subsequentResponse = await client.GetAsync("?QueryA=valuea&QueryB=valueb"); 435var initialResponse = await client.GetAsync("?QueryA=ValueA&QueryB=ValueB"); 436var subsequentResponse = await client.GetAsync("?QueryB=ValueB&QueryA=ValueA"); 458var initialResponse = await client.GetAsync("?QueryA=ValueA&QueryB=ValueB"); 459var subsequentResponse = await client.GetAsync("?QueryB=ValueB&QueryA=ValueA"); 480var initialResponse = await client.GetAsync("?query=value"); 481var subsequentResponse = await client.GetAsync("?query=value2"); 503var initialResponse = await client.GetAsync("?other=value1"); 504var subsequentResponse = await client.GetAsync("?other=value2"); 525var initialResponse = await client.GetAsync("?querya=valuea&queryb=valueb"); 526var subsequentResponse = await client.GetAsync("?querya=ValueA&queryb=ValueB"); 547var initialResponse = await client.GetAsync("?querya=valuea&queryb=valueb"); 548var subsequentResponse = await client.GetAsync("?querya=ValueA&queryb=ValueB"); 567var initialResponse = await client.GetAsync(""); 572var subsequentResponse = await client.GetAsync(""); 591var initialResponse = await client.GetAsync(""); 596var subsequentResponse = await client.GetAsync("/different"); 616var initialResponse = await client.GetAsync(""); 617var subsequentResponse = await client.GetAsync(""); 636var initialResponse = await client.GetAsync(""); 641var subsequentResponse = await client.GetAsync(""); 664var initialResponse = await client.GetAsync(""); 665var subsequentResponse = await client.GetAsync(""); 684var initialResponse = await client.GetAsync(""); 685var subsequentResponse = await client.GetAsync(""); 710var initialResponse = await client.GetAsync(""); 712var subsequentResponse = await client.GetAsync(""); 733var initialResponse = await client.GetAsync(""); 735var subsequentResponse = await client.GetAsync(""); 759var initialResponse = await client.GetAsync(""); 761var subsequentResponse = await client.GetAsync(""); 782var initialResponse = await client.GetAsync(""); 784var subsequentResponse = await client.GetAsync(""); 809var initialResponse = await client.GetAsync(""); 810var subsequentResponse = await client.GetAsync(""); 832var initialResponse = await client.GetAsync(""); 833var subsequentResponse = await client.GetAsync("/different"); 855var initialResponse = await client.GetAsync("/path"); 856var subsequentResponse = await client.GetAsync("/Path"); 876var initialResponse = await client.GetAsync(""); 878var otherResponse = await client.GetAsync(""); 880var subsequentResponse = await client.GetAsync(""); 903var initialResponse = await client.GetAsync(""); 908var otherResponse = await client.GetAsync(""); 913var subsequentResponse = await client.GetAsync(""); 932var initialResponse = await client.SendAsync(TestUtils.CreateRequest("HEAD", "?contentLength=10")); 933var subsequentResponse = await client.SendAsync(TestUtils.CreateRequest("HEAD", "?contentLength=10")); 1003var resp = await client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "")); 1033private static void Assert304Headers(HttpResponseMessage initialResponse, HttpResponseMessage subsequentResponse) 1049private static async Task AssertCachedResponseAsync(HttpResponseMessage initialResponse, HttpResponseMessage subsequentResponse) 1062private static async Task AssertFreshResponseAsync(HttpResponseMessage initialResponse, HttpResponseMessage subsequentResponse)
Microsoft.AspNetCore.ResponseCaching.Tests (85)
ResponseCachingTests.cs (85)
29var initialResponse = await client.SendAsync(TestUtils.CreateRequest(method, "")); 30var subsequentResponse = await client.SendAsync(TestUtils.CreateRequest(method, "")); 53var initialResponse = await client.SendAsync(TestUtils.CreateRequest(method, "")); 54var subsequentResponse = await client.SendAsync(TestUtils.CreateRequest(method, "different")); 75var initialResponse = await client.PostAsync("", new StringContent(string.Empty)); 76var subsequentResponse = await client.PostAsync("", new StringContent(string.Empty)); 97var subsequentResponse = await client.SendAsync(new HttpRequestMessage(HttpMethod.Head, "")); 98var initialResponse = await client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "")); 119var initialResponse = await client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "")); 120var subsequentResponse = await client.SendAsync(new HttpRequestMessage(HttpMethod.Head, "")); 144var initialResponse = await client.SendAsync(TestUtils.CreateRequest(method, "")); 147var cachedResponse = await client.SendAsync(TestUtils.CreateRequest(method, "")); 153var subsequentResponse = await client.SendAsync(TestUtils.CreateRequest(method, "")); 177var initialResponse = await client.SendAsync(TestUtils.CreateRequest(method, "")); 180var cachedResponse = await client.SendAsync(TestUtils.CreateRequest(method, "")); 186var subsequentResponse = await client.SendAsync(TestUtils.CreateRequest(method, "")); 209var initialResponse = await client.SendAsync(TestUtils.CreateRequest(method, "path")); 210var subsequentResponse = await client.SendAsync(TestUtils.CreateRequest(method, "PATH")); 233var initialResponse = await client.SendAsync(TestUtils.CreateRequest(method, "?Expires=0")); 234var subsequentResponse = await client.SendAsync(TestUtils.CreateRequest(method, "")); 258var initialResponse = await client.SendAsync(TestUtils.CreateRequest(method, "")); 259var subsequentResponse = await client.SendAsync(TestUtils.CreateRequest(method, "")); 281var initialResponse = await client.GetAsync(""); 282var subsequentResponse = await client.GetAsync(""); 304var initialResponse = await client.GetAsync(""); 306var subsequentResponse = await client.GetAsync(""); 327var initialResponse = await client.GetAsync("?query=value"); 328var subsequentResponse = await client.GetAsync("?query=value"); 349var initialResponse = await client.GetAsync("?querya=valuea&queryb=valueb"); 350var subsequentResponse = await client.GetAsync("?QueryA=valuea&QueryB=valueb"); 371var initialResponse = await client.GetAsync("?querya=valuea&queryb=valueb"); 372var subsequentResponse = await client.GetAsync("?QueryA=valuea&QueryB=valueb"); 393var initialResponse = await client.GetAsync("?QueryA=ValueA&QueryB=ValueB"); 394var subsequentResponse = await client.GetAsync("?QueryB=ValueB&QueryA=ValueA"); 415var initialResponse = await client.GetAsync("?QueryA=ValueA&QueryB=ValueB"); 416var subsequentResponse = await client.GetAsync("?QueryB=ValueB&QueryA=ValueA"); 437var initialResponse = await client.GetAsync("?query=value"); 438var subsequentResponse = await client.GetAsync("?query=value2"); 459var initialResponse = await client.GetAsync("?querya=valuea&queryb=valueb"); 460var subsequentResponse = await client.GetAsync("?querya=ValueA&queryb=ValueB"); 481var initialResponse = await client.GetAsync("?querya=valuea&queryb=valueb"); 482var subsequentResponse = await client.GetAsync("?querya=ValueA&queryb=ValueB"); 503var initialResponse = await client.GetAsync(""); 508var subsequentResponse = await client.GetAsync(""); 529var initialResponse = await client.GetAsync(""); 534var subsequentResponse = await client.GetAsync("/different"); 556var initialResponse = await client.GetAsync(""); 557var subsequentResponse = await client.GetAsync(""); 578var initialResponse = await client.GetAsync(""); 583var subsequentResponse = await client.GetAsync(""); 608var initialResponse = await client.GetAsync(""); 609var subsequentResponse = await client.GetAsync(""); 630var initialResponse = await client.GetAsync(""); 631var subsequentResponse = await client.GetAsync(""); 657var initialResponse = await client.GetAsync("?Expires=90"); 659var subsequentResponse = await client.GetAsync(""); 682var initialResponse = await client.GetAsync(""); 684var subsequentResponse = await client.GetAsync(""); 710var initialResponse = await client.GetAsync("?Expires=90"); 712var subsequentResponse = await client.GetAsync(""); 735var initialResponse = await client.GetAsync(""); 737var subsequentResponse = await client.GetAsync(""); 761var initialResponse = await client.GetAsync(""); 762var subsequentResponse = await client.GetAsync(""); 786var initialResponse = await client.GetAsync(""); 787var subsequentResponse = await client.GetAsync("/different"); 811var initialResponse = await client.GetAsync("/path"); 812var subsequentResponse = await client.GetAsync("/Path"); 834var initialResponse = await client.GetAsync(""); 836var otherResponse = await client.GetAsync(""); 838var subsequentResponse = await client.GetAsync(""); 863var initialResponse = await client.GetAsync(""); 868var otherResponse = await client.GetAsync(""); 873var subsequentResponse = await client.GetAsync(""); 898var initialResponse = await client.GetAsync(""); 903var otherResponse = await client.GetAsync(""); 908var subsequentResponse = await client.GetAsync(""); 929var initialResponse = await client.SendAsync(TestUtils.CreateRequest("HEAD", "?contentLength=10")); 930var subsequentResponse = await client.SendAsync(TestUtils.CreateRequest("HEAD", "?contentLength=10")); 937private static void Assert304Headers(HttpResponseMessage initialResponse, HttpResponseMessage subsequentResponse) 953private static async Task AssertCachedResponseAsync(HttpResponseMessage initialResponse, HttpResponseMessage subsequentResponse) 966private static async Task AssertFreshResponseAsync(HttpResponseMessage initialResponse, HttpResponseMessage subsequentResponse)
Microsoft.AspNetCore.ResponseCompression.Tests (20)
ResponseCompressionMiddlewareTest.cs (20)
180var response = await client.SendAsync(request); 338var response = await client.SendAsync(request); 477var response = await client.SendAsync(request); 540var response = await client.SendAsync(request); 603var response = await client.SendAsync(request); 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); 1065var response = await client.SendAsync(request); 1115var response = await client.SendAsync(request); 1165var response = await client.SendAsync(request); 1215var response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead); 1230private static async Task<(HttpResponseMessage, List<WriteContext>)> InvokeMiddleware( 1284var response = await client.SendAsync(request); 1289private static void CheckResponseCompressed(HttpResponseMessage response, long? expectedBodyLength, string expectedEncoding) 1306private static void CheckResponseNotCompressed(HttpResponseMessage response, long? expectedBodyLength, bool sendVaryHeader)
Microsoft.AspNetCore.Rewrite.Tests (37)
ApacheModRewrite\ModRewriteMiddlewareTest.cs (4)
350var response = await server.CreateClient().GetAsync(input); 378var response = await server.CreateClient().GetAsync(input); 433var response = await server.CreateClient().GetAsync(""); 462var response = await server.CreateClient().GetAsync("/home?report_id=123");
IISUrlRewrite\MiddleWareTests.cs (11)
45var response = await server.CreateClient().GetAsync("article/10/hey"); 145var response = await server.CreateClient().GetAsync("HElLo"); 180var response = await server.CreateClient().GetAsync("hey/hello/"); 215var response = await server.CreateClient().GetAsync("hey/hello"); 249var response = await server.CreateClient().GetAsync(new Uri("http://example.com")); 363var response = await server.CreateClient().GetAsync(new Uri("http://example.com/")); 432var response = await server.CreateClient().GetAsync(""); 470var response = await server.CreateClient().GetAsync("hey/hello"); 506var response = await server.CreateClient().GetAsync("article/23?p1=123&p2=abc"); 542var response = await server.CreateClient().GetAsync("article/23?p1=123&p2=abc"); 692var response = await server.CreateClient().GetAsync("article/10/hey");
MiddlewareTests.cs (22)
172var response = await server.CreateClient().GetAsync(requestUrl); 202var response = await server.CreateClient().GetAsync("foo"); 226var response = await server.CreateClient().GetAsync("foo?bar=1"); 254var response = await server.CreateClient().GetAsync(new Uri("http://example.com")); 281var response = await server.CreateClient().GetAsync(new Uri("http://example.com")); 327var response = await server.CreateClient().GetAsync(new Uri("http://" + hostPathAndQuery)); 355var response = await server.CreateClient().GetAsync(new Uri(hostSchemePathAndQuery)); 381var response = await server.CreateClient().GetAsync(new Uri("http://example.com")); 408var response = await server.CreateClient().GetAsync(new Uri("http://example.com")); 437var response = await server.CreateClient().GetAsync(new Uri("https://example.com")); 466var response = await server.CreateClient().GetAsync(new Uri(requestUri)); 491var response = await server.CreateClient().GetAsync(new Uri("https://example.com")); 526var response = await server.CreateClient().GetAsync(new Uri(requestUri)); 554var response = await server.CreateClient().GetAsync(new Uri("https://www.example.com")); 583var response = await server.CreateClient().GetAsync(new Uri(requestUri)); 608var response = await server.CreateClient().GetAsync(new Uri("https://www.example.com")); 633var response = await server.CreateClient().GetAsync(""); 724var response = await server.CreateClient().GetAsync(""); 753var response = await server.CreateClient().GetAsync(new Uri(requestUri)); 781var response = await server.CreateClient().GetAsync(new Uri(requestUri)); 806var response = await server.CreateClient().GetAsync(new Uri("https://example.com")); 835var response = await server.CreateClient().GetAsync(new Uri("https://example.com"));
Microsoft.AspNetCore.Routing.FunctionalTests (52)
Benchmarks\EndpointRoutingBenchmarkTest.cs (1)
46var response = await _client.GetAsync("/plaintext");
Benchmarks\RouterBenchmarkTest.cs (1)
47var response = await _client.GetAsync("/plaintext");
EndpointRoutingIntegrationTest.cs (6)
56var response = await server.CreateRequest("/").SendAsync("GET"); 88var response = await server.CreateRequest("/not-found").SendAsync("GET"); 120var response = await server.CreateRequest("/").SendAsync("GET"); 181var response = await server.CreateRequest("/not-found").SendAsync("GET"); 275var response = await server.CreateRequest("/").SendAsync("PUT"); 311var response = await request.SendAsync(HttpMethods.Options);
EndpointRoutingSampleTest.cs (13)
39var response = await _client.SendAsync(message); 53var response = await _client.GetAsync("/"); 70var response = await _client.GetAsync("/plaintext"); 89var response = await _client.GetAsync("/helloworld"); 107var response = await _client.GetAsync("/withconstraints/555_001"); 120var response = await _client.GetAsync("/withconstraints/555"); 133var response = await _client.GetAsync("/withoptionalconstraints/555_001"); 149var response = await _client.GetAsync("/withoptionalconstraints"); 162var response = await _client.GetAsync("/withoptionalconstraints/555"); 176var response = await _client.GetAsync(url); 194var response = await _client.GetAsync(url); 207var response = await _client.GetAsync("/WithDoubleAsteriskCatchAll/a/b b1/c c1"); 220var response = await _client.GetAsync("/convention");
HostMatchingTests.cs (5)
36var response = await client.SendAsync(request); 54var response = await client.SendAsync(request); 72var response = await client.SendAsync(request); 90var response = await client.SendAsync(request); 108var response = await client.SendAsync(request);
MapFallbackTest.cs (5)
28var response = await _client.SendAsync(request); 45var response = await _client.SendAsync(request); 62var response = await _client.SendAsync(request); 79var response = await _client.SendAsync(request); 96var response = await _client.SendAsync(request);
MinimalFormTests.cs (11)
64var response = await client.SendAsync(request); 124var response = await client.SendAsync(request); 169var response = await client.SendAsync(request); 285var response = await client.SendAsync(request); 332var response = await client.SendAsync(request); 492var response = await client.SendAsync(request); 547var response = await client.SendAsync(request); 599var response = await client.SendAsync(request); 651var response = await client.SendAsync(request); 697var response = await client.SendAsync(request); 723var response = await client.PostAsync("/", null);
RouteHandlerTest.cs (2)
52var response = await client.PostAsJsonAsync("/EchoTodo/42", todo); 96var response = await client.GetAsync("/");
RouterSampleTest.cs (4)
37var response = await _client.SendAsync(message); 51var response = await _client.SendAsync(message); 65var response = await _client.SendAsync(message); 87var response = await _client.SendAsync(message);
ShortCircuitTests.cs (3)
52var response = await server.CreateRequest("/shortcircuit").SendAsync("GET"); 90var response1 = await server.CreateRequest("/shortcircuit").SendAsync("GET"); 94var response2 = await server.CreateRequest("/shortcircuit/whatever").SendAsync("GET");
WebHostBuilderExtensionsTest.cs (1)
97var response = await client.SendAsync(request);
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (156)
AuthenticationTests.cs (19)
38var response = await SendRequestAsync(address); 56var response = await SendRequestAsync(address); 78var response = await SendRequestAsync(address); 104var response = await SendRequestAsync(address); 140var response = await SendRequestAsync(address, useDefaultCredentials: true); 161var response = await SendRequestAsync(address, useDefaultCredentials: true); 187var response = await SendRequestAsync(address, useDefaultCredentials: true); 213var response = await SendRequestAsync(address); 236var response = await SendRequestAsync(address, useDefaultCredentials: true); 258var response = await SendRequestAsync(address); 281var response = await SendRequestAsync(address); 299var response = await SendRequestAsync(address); 325var response = await SendRequestAsync(address); 343var response = await SendRequestAsync(address); 364var response = await SendRequestAsync(address, useDefaultCredentials: true); 398var response = await SendRequestAsync(address, useDefaultCredentials: true); 425var response = await SendRequestAsync(address, useDefaultCredentials: true); 452var response = await SendRequestAsync(address, useDefaultCredentials: true); 457private async Task<HttpResponseMessage> SendRequestAsync(string uri, bool useDefaultCredentials = false)
DelegateTests.cs (1)
278var response = await client.PostAsync(uri, content);
Http3Tests.cs (5)
78var response1 = await client.SendAsync(request); 116var response2 = await client.GetAsync(address); 148var response = await client.GetAsync(address); 206var response = await client.GetAsync(address, HttpCompletionOption.ResponseHeadersRead); 232var response = await client.GetAsync(address, HttpCompletionOption.ResponseHeadersRead);
HttpsTests.cs (1)
283HttpResponseMessage response = await client.PostAsync(uri, new StringContent(upload));
Listener\AuthenticationOnExistingQueueTests.cs (13)
60Task<HttpResponseMessage> responseTask = SendRequestAsync(address); 68var response = await responseTask; 83Task<HttpResponseMessage> responseTask = SendRequestAsync(address); 86var response = await responseTask; 101Task<HttpResponseMessage> responseTask = SendRequestAsync(address); 110var response = await responseTask; 126Task<HttpResponseMessage> responseTask = SendRequestAsync(address); 135var response = await responseTask; 151Task<HttpResponseMessage> responseTask = SendRequestAsync(address, useDefaultCredentials: true); 166var response = await responseTask; 181Task<HttpResponseMessage> responseTask = SendRequestAsync(address, useDefaultCredentials: true); 189var response = await responseTask; 219private async Task<HttpResponseMessage> SendRequestAsync(string uri, bool useDefaultCredentials = false)
Listener\RequestBodyTests.cs (1)
205HttpResponseMessage response = await client.PostAsync(uri, content);
Listener\ResponseBodyTests.cs (12)
42var response = await responseTask; 67var response = await responseTask; 91var response = await responseTask; 116var response = await responseTask; 138var response = await responseTask; 198var response = await responseTask; 220var response = await responseTask; 379var response = await responseTask; 418var response = await responseTask; 457var response = await responseTask; 491var response = await responseTask; 506private async Task<HttpResponseMessage> SendRequestAsync(string uri, CancellationToken cancellationToken = new CancellationToken())
Listener\ResponseHeaderTests.cs (22)
33Task<HttpResponseMessage> responseTask = SendRequestAsync(address); 38HttpResponseMessage response = await responseTask; 55Task<HttpResponseMessage> responseTask = SendRequestAsync(address, usehttp11: false); 60HttpResponseMessage response = await responseTask; 78Task<HttpResponseMessage> responseTask = SendHeadRequestAsync(address); 83HttpResponseMessage response = await responseTask; 106Task<HttpResponseMessage> responseTask = SendHeadRequestAsync(address, usehttp11: false); 111HttpResponseMessage response = await responseTask; 135Task<HttpResponseMessage> responseTask = SendHeadRequestAsync(address); 141HttpResponseMessage response = await responseTask; 164Task<HttpResponseMessage> responseTask = SendRequestAsync(address); 170HttpResponseMessage response = await responseTask; 187Task<HttpResponseMessage> responseTask = SendHeadRequestAsync(address); 193HttpResponseMessage response = await responseTask; 228Task<HttpResponseMessage> responseTask = SendRequestAsync(address, usehttp11: false, sendKeepAlive: true, httpClient: client); 232HttpResponseMessage response = await responseTask; 259Task<HttpResponseMessage> responseTask = SendRequestAsync(address, usehttp11: false, sendKeepAlive: true); 267HttpResponseMessage response = await responseTask; 299Task<HttpResponseMessage> responseTask = SendRequestAsync(address); 334HttpResponseMessage response = await responseTask; 339private async Task<HttpResponseMessage> SendRequestAsync(string uri, bool usehttp11 = true, bool sendKeepAlive = false, HttpClient httpClient = null) 354private async Task<HttpResponseMessage> SendHeadRequestAsync(string uri, bool usehttp11 = true)
Listener\ServerOnExistingQueueTests.cs (1)
327HttpResponseMessage response = await client.PostAsync(uri, new StringContent(upload));
Listener\ServerTests.cs (1)
66var response = await responseTask;
OpaqueUpgradeTests.cs (5)
39HttpResponseMessage response = await SendRequestAsync(address); 67HttpResponseMessage response = await SendRequestAsync(address); 98HttpResponseMessage response = await SendRequestAsync(address); 300var response = await client.SendAsync(request); 369private async Task<HttpResponseMessage> SendRequestAsync(string uri)
RequestBodyLimitTests.cs (1)
415HttpResponseMessage response = await client.PostAsync(uri, content);
RequestBodyTests.cs (1)
303HttpResponseMessage response = await client.PostAsync(uri, content);
RequestHeaderTests.cs (1)
240var result = await client.GetAsync(uri);
ResponseBodyTests.cs (15)
32var response = await SendRequestAsync(address); 61var response = await SendRequestAsync(address); 82var response = await SendRequestAsync(address); 101var response = await SendRequestAsync(address); 119var response = await SendRequestAsync(address); 151var response = await SendRequestAsync(address); 176var response = await SendRequestAsync(address); 198var response = await SendRequestAsync(address); 222var response = await SendRequestAsync(address); 302HttpResponseMessage response = await SendRequestAsync(address); 333var response = await SendRequestAsync(address); 361var response = await SendRequestAsync(address); 388var response = await SendRequestAsync(address); 429var response = await SendRequestAsync(address); 437private async Task<HttpResponseMessage> SendRequestAsync(string uri)
ResponseCachingTests.cs (2)
473var response = await client.GetAsync(uri); 488var response = await client.GetAsync(uri);
ResponseHeaderTests.cs (9)
29HttpResponseMessage response = await SendRequestAsync(address); 130var response = await httpClient.GetAsync(address); 149HttpResponseMessage response = await SendRequestAsync(address); 174HttpResponseMessage response = await client.SendAsync(request); 201HttpResponseMessage response = await client.SendAsync(request); 233HttpResponseMessage response = await SendRequestAsync(address); 263HttpResponseMessage response = await SendRequestAsync(address); 286HttpResponseMessage response = await SendRequestAsync(address); 327private async Task<HttpResponseMessage> SendRequestAsync(string uri)
ResponseSendFileTests.cs (19)
55HttpResponseMessage response = await SendRequestAsync(address); 71HttpResponseMessage response = await SendRequestAsync(address); 90HttpResponseMessage response = await SendRequestAsync(address); 109var response = await SendRequestAsync(address); 129var response = await SendRequestAsync(address); 148var response = await SendRequestAsync(address); 170var response = await SendRequestAsync(address); 189var response = await SendRequestAsync(address); 205var response = await SendRequestAsync(address); 225var response = await SendRequestAsync(address); 246var response = await SendRequestAsync(address); 267var response = await SendRequestAsync(address); 294var response = await SendRequestAsync(address); 320var response = await SendRequestAsync(address); 344var response = await SendRequestAsync(address); 362var response = await SendRequestAsync(address); 614var response = await client.GetAsync(address, HttpCompletionOption.ResponseHeadersRead); 663var response = await client.GetAsync(address, HttpCompletionOption.ResponseHeadersRead); 679private async Task<HttpResponseMessage> SendRequestAsync(string uri, CancellationToken cancellationToken = new CancellationToken())
ResponseTests.cs (10)
33HttpResponseMessage response = await SendRequestAsync(address); 52HttpResponseMessage response = await SendRequestAsync(address); 72HttpResponseMessage response = await SendRequestAsync(address); 90HttpResponseMessage response = await SendRequestAsync(address); 107HttpResponseMessage response = await SendRequestAsync(address); 122HttpResponseMessage response = await SendRequestAsync(address); 150var response = await SendRequestAsync(address); 179var response = await SendRequestAsync(address); 209var response = await SendRequestAsync(address); 279private async Task<HttpResponseMessage> SendRequestAsync(string uri)
ResponseTrailersTests.cs (15)
32var response = await SendRequestAsync(address, http2: false); 50var response = await SendRequestAsync(address); 71var response = await SendRequestAsync(address); 89var response = await SendRequestAsync(address); 107var response = await SendRequestAsync(address); 137var response = await SendRequestAsync(address); 160var response = await SendRequestAsync(address); 185var response = await SendRequestAsync(address); 211var response = await SendRequestAsync(address); 235var response = await SendRequestAsync(address); 257var response = await SendRequestAsync(address); 277var response = await SendRequestAsync(address); 305var response = await SendRequestAsync(address); 325HttpResponseMessage response = await SendRequestAsync(address); 358private async Task<HttpResponseMessage> SendRequestAsync(string uri, bool http2 = true)
ServerTests.cs (2)
372HttpResponseMessage response = await client4.GetAsync(address); 649HttpResponseMessage response = await client.PostAsync(uri, new StringContent(upload));
Microsoft.AspNetCore.Server.IISIntegration.Tests (7)
IISMiddlewareTests.cs (7)
56var response = await server.CreateClient().SendAsync(req); 93var response = await server.CreateClient().SendAsync(req); 137var response = await server.CreateClient().SendAsync(request); 196var response = await server.CreateClient().SendAsync(request); 241var response = await server.CreateClient().SendAsync(request); 286var response = await server.CreateClient().SendAsync(request); 385var response = await server.CreateClient().SendAsync(request);
Microsoft.AspNetCore.Server.IntegrationTesting (6)
Common\LoggingHandler.cs (2)
18protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 23var response = await base.SendAsync(request, cancellationToken);
Common\RetryHelper.cs (3)
19public static async Task<HttpResponseMessage> RetryRequest( 20Func<Task<HttpResponseMessage>> retryBlock, 36var response = await retryBlock().ConfigureAwait(false);
Deployers\NginxDeployer.cs (1)
81var response = await RetryHelper.RetryRequest(() =>
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (5)
LoggingHandler.cs (3)
21protected override async Task<HttpResponseMessage> SendAsync( 26var response = await base.SendAsync(request, cancellationToken); 32private async Task LogResponse(LogLevel logLevel, HttpResponseMessage response)
RetryHandler.cs (2)
23protected override async Task<HttpResponseMessage> SendAsync( 27HttpResponseMessage response = null;
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (7)
WebHostTests.cs (7)
84var response = await client.SendAsync(request); 248var response1 = await client.SendAsync(request1).DefaultTimeout(); 262var response2 = await client.SendAsync(request2).DefaultTimeout(); 319var response1 = await client.SendAsync(request1).DefaultTimeout(); 332var response2 = await client.SendAsync(request2).DefaultTimeout(); 357var response1 = await client.SendAsync(request1).DefaultTimeout(); 369var response2 = await client.SendAsync(request2).DefaultTimeout();
Microsoft.AspNetCore.Session.Tests (21)
SessionTests.cs (21)
55var response = await client.GetAsync(string.Empty); 92var response = await client.GetAsync(string.Empty); 147var response = await client.GetAsync(requestUri); 198var response = await client.GetAsync("first"); 258var response = await client.GetAsync("first"); 316var response = await client.GetAsync("first"); 362var response = await client.GetAsync(string.Empty); 421var response = await client.GetAsync("first"); 490var response = await client.GetAsync("AddDataToSession"); 546var response = await client.GetAsync(string.Empty); 596var response = await client.GetAsync(string.Empty); 632var response = await client.GetAsync(string.Empty); 677var response = await client.GetAsync(string.Empty); 726var response = await client.GetAsync(string.Empty); 775var response = await client.GetAsync(string.Empty); 823var response = await client.GetAsync(string.Empty); 875var response = await client.GetAsync(string.Empty); 938var response = await client.GetAsync(string.Empty); 1004var response = await client.GetAsync(string.Empty); 1069var response = await client.GetAsync(string.Empty); 1121var response = await client.GetAsync(string.Empty);
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (4)
HubConnectionTests.cs (4)
1478var httpResponse = await new HttpClient().GetAsync(server.Url + "/generateJwtToken"); 2695var httpResponse = await new HttpClient().GetAsync(server.Url + $"/generateJwtToken/{userName}"); 2972public Task<HttpResponseMessage> ActivePoll { get; private set; } 2978protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Microsoft.AspNetCore.SignalR.Client.Tests (69)
HttpConnectionFactoryTests.cs (1)
29testHandler.OnRequest((req, next, ct) => Task.FromException<HttpResponseMessage>(new Exception("BOOM")));
HttpConnectionTests.ConnectionLifecycle.cs (1)
293var longPollResult = new TaskCompletionSource<HttpResponseMessage>();
HttpConnectionTests.Negotiate.cs (3)
281var tcs = new TaskCompletionSource<HttpResponseMessage>(TaskCreationOptions.RunContinuationsAsynchronously); 385var tcs = new TaskCompletionSource<HttpResponseMessage>(TaskCreationOptions.RunContinuationsAsynchronously); 450var tcs = new TaskCompletionSource<HttpResponseMessage>(TaskCreationOptions.RunContinuationsAsynchronously);
HttpConnectionTests.Transport.cs (3)
207var resp = ResponseUtils.CreateResponse(HttpStatusCode.OK, messageFragments[requestCount]); 230var longPollTcs = new TaskCompletionSource<HttpResponseMessage>(); 375var resp = ResponseUtils.CreateResponse(HttpStatusCode.OK, messageFragments[pollCount / 2]);
LongPollingTransportTests.cs (19)
35.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 70.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 104.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 159.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 187.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 233.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 278.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 327.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 369.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 406.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 458var tcs = new TaskCompletionSource<HttpResponseMessage>(); 463.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 525var pollTcs = new TaskCompletionSource<HttpResponseMessage>(); 531.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 587.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 616.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 642.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 702var responseTaskCompletionSource = new TaskCompletionSource<HttpResponseMessage>(); 748var response = await responseTaskCompletionSource.Task.DefaultTimeout();
ResponseUtils.cs (4)
17public static HttpResponseMessage CreateResponse(HttpStatusCode statusCode) => 20public static HttpResponseMessage CreateResponse(HttpStatusCode statusCode, string payload) => 23public static HttpResponseMessage CreateResponse(HttpStatusCode statusCode, byte[] payload) => 26public static HttpResponseMessage CreateResponse(HttpStatusCode statusCode, HttpContent payload)
SendUtilsTests.cs (2)
20var responseTaskCompletionSource = new TaskCompletionSource<HttpResponseMessage>(TaskCreationOptions.RunContinuationsAsynchronously); 46var response = await responseTaskCompletionSource.Task.DefaultTimeout();
ServerSentEventsTransportTests.cs (12)
31.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 72.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 125.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 175.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 230.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 273.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 304.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 362.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 389.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 412var responseTaskCompletionSource = new TaskCompletionSource<HttpResponseMessage>(TaskCreationOptions.RunContinuationsAsynchronously); 437var response = await responseTaskCompletionSource.Task.DefaultTimeout(); 474.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>())
TestHttpMessageHandler.cs (24)
15delegate Task<HttpResponseMessage> RequestDelegate(HttpRequestMessage requestMessage, CancellationToken cancellationToken); 77protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 135public void OnRequest(Func<HttpRequestMessage, Func<Task<HttpResponseMessage>>, CancellationToken, Task<HttpResponseMessage>> handler) 151public void OnGet(string pathAndQuery, Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> handler) => OnRequest(HttpMethod.Get, pathAndQuery, handler); 152public void OnPost(string pathAndQuery, Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> handler) => OnRequest(HttpMethod.Post, pathAndQuery, handler); 153public void OnPut(string pathAndQuery, Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> handler) => OnRequest(HttpMethod.Put, pathAndQuery, handler); 154public void OnDelete(string pathAndQuery, Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> handler) => OnRequest(HttpMethod.Delete, pathAndQuery, handler); 155public void OnHead(string pathAndQuery, Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> handler) => OnRequest(HttpMethod.Head, pathAndQuery, handler); 156public void OnOptions(string pathAndQuery, Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> handler) => OnRequest(HttpMethod.Options, pathAndQuery, handler); 157public void OnTrace(string pathAndQuery, Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> handler) => OnRequest(HttpMethod.Trace, pathAndQuery, handler); 159public void OnRequest(HttpMethod method, string pathAndQuery, Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> handler) 175public void OnNegotiate(Func<HttpRequestMessage, CancellationToken, HttpResponseMessage> handler) => OnNegotiate((req, cancellationToken) => Task.FromResult(handler(req, cancellationToken))); 177public void OnNegotiate(Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> handler) 192public void OnLongPollDelete(Func<CancellationToken, HttpResponseMessage> handler) => OnLongPollDelete((cancellationToken) => Task.FromResult(handler(cancellationToken))); 194public void OnLongPollDelete(Func<CancellationToken, Task<HttpResponseMessage>> handler) 209public void OnLongPoll(Func<CancellationToken, HttpResponseMessage> handler) => OnLongPoll(cancellationToken => Task.FromResult(handler(cancellationToken))); 211public void OnLongPoll(Func<CancellationToken, Task<HttpResponseMessage>> handler) 216public void OnLongPoll(Func<HttpRequestMessage, CancellationToken, HttpResponseMessage> handler) 221public void OnLongPoll(Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> handler) 236public void OnSocketSend(Func<byte[], CancellationToken, HttpResponseMessage> handler) => OnSocketSend((data, cancellationToken) => Task.FromResult(handler(data, cancellationToken))); 238public void OnSocketSend(Func<byte[], CancellationToken, Task<HttpResponseMessage>> handler) 254private Task<HttpResponseMessage> BaseHandler(HttpRequestMessage request, CancellationToken cancellationToken) 256return Task.FromException<HttpResponseMessage>(new InvalidOperationException($"Http endpoint not implemented: {request.Method} {request.RequestUri}"));
Microsoft.AspNetCore.SignalR.Tests (6)
EndToEndTests.cs (6)
174.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 176(request, cancellationToken) => Task.FromException<HttpResponseMessage>(new InvalidOperationException("HTTP requests should not be sent."))); 224.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 226(request, cancellationToken) => Task.FromException<HttpResponseMessage>(new InvalidOperationException("HTTP requests should not be sent."))); 481var response = await client.GetAsync("generatetoken?user=bob"); 655var response = await client.GetAsync("generatetoken?user=bob");
Microsoft.AspNetCore.SpaProxy (2)
SpaProxyLaunchManager.cs (2)
81var response = await httpClient.GetAsync(_options.ServerUrl, cancellationTokenSource.Token); 112var response = await httpClient.GetAsync(_options.ServerUrl, cancellationTokenSource.Token);
Microsoft.AspNetCore.SpaServices.Extensions (2)
Proxying\SpaProxy.cs (2)
86using (var responseMessage = await httpClient.SendAsync( 165private static async Task CopyProxyHttpResponse(HttpContext context, HttpResponseMessage responseMessage, CancellationToken cancellationToken)
Microsoft.AspNetCore.SpaServices.Extensions.Tests (1)
SpaProxyTests.cs (1)
23.Setup<Task<HttpResponseMessage>>("SendAsync",
Microsoft.AspNetCore.StaticAssets.Tests (44)
StaticAssetsIntegrationTests.cs (44)
61var response = await client.GetAsync("/sample.txt"); 111var response = await client.GetAsync("/sample.txt"); 163var response = await client.GetAsync("/sample.txt"); 226var response = await client.GetAsync("/has-integrity"); 283var response = await client.GetAsync("/has-integrity"); 332var response = await client.GetAsync("/sample.txt"); 385var response = await client.GetAsync("/sample.txt"); 440var response = await client.SendAsync(message); 623var response = await client.GetAsync("http://localhost/sample.txt"); 633var response1 = await client.GetAsync("http://localhost/sample.txt"); 634var response2 = await client.GetAsync("http://localhost/sample.txt"); 653var resp = await client.SendAsync(req); 662var original = await client.GetAsync("http://localhost/sample.txt"); 666var resp = await client.SendAsync(req); 677var resp = await client.SendAsync(req); 688var resp = await client.SendAsync(req); 711var resp1 = await client.GetAsync("http://localhost/sample.txt"); 715var resp2 = await client.SendAsync(req2); 724var resp1 = await client.GetAsync("http://localhost/sample.txt"); 728var resp2 = await client.SendAsync(req2); 737var resp1 = await client.GetAsync("http://localhost/sample.txt"); 741var resp2 = await client.SendAsync(req2); 761var response = await client.SendAsync( 784var resp1 = await client.SendAsync(req1); 789var resp2 = await client.SendAsync(req2); 800var resp1 = await client.SendAsync(req1); 806var resp2 = await client.SendAsync(req2); 812var resp3 = await client.SendAsync(req3); 823var resp1 = await client.SendAsync(req1); 832var resp2 = await client.SendAsync(req2); 837var resp3 = await client.SendAsync(req3); 842var resp4 = await client.SendAsync(req4); 869var res = await client.SendAsync(req); 882var res = await client.SendAsync(req); 900var res1 = await client.SendAsync( 905var res2 = await client.SendAsync(req2); 915var res1 = await client.SendAsync( 929var res2 = await client.SendAsync(req2); 941var res1 = await client.SendAsync( 946var res2 = await client.SendAsync(req2); 959var res = await client.SendAsync(req); 971var res = await client.SendAsync(req); 982var res1 = await client.SendAsync( 987var res2 = await client.SendAsync(req2);
Microsoft.AspNetCore.StaticFiles.FunctionalTests (7)
FallbackStaticFileTest.cs (2)
59var response = await client.GetAsync("hello"); 108var response = await client.GetAsync("hello");
StaticFileMiddlewareTests.cs (5)
38var response = await client.GetAsync("TestDocument.txt"); 83var response = await client.GetAsync("TestDocument.txt"); 109var response = await client.GetAsync("TestDocument.txt"); 159var response = await client.GetAsync(requestUrl); 202var response = await client.SendAsync(request);
Microsoft.AspNetCore.StaticFiles.Tests (98)
CacheHeaderTests.cs (36)
20HttpResponseMessage response = await server.CreateClient().GetAsync("http://localhost/SubFolder/extra.xml"); 31HttpResponseMessage response1 = await server.CreateClient().GetAsync("http://localhost/SubFolder/extra.xml"); 32HttpResponseMessage response2 = await server.CreateClient().GetAsync("http://localhost/SubFolder/extra.xml"); 52HttpResponseMessage resp = await server.CreateClient().SendAsync(req); 62HttpResponseMessage original = await server.CreateClient().GetAsync("http://localhost/SubFolder/extra.xml"); 66HttpResponseMessage resp = await server.CreateClient().SendAsync(req); 78HttpResponseMessage resp = await server.CreateClient().SendAsync(req); 90HttpResponseMessage resp = await server.CreateClient().SendAsync(req); 114HttpResponseMessage resp1 = await server.CreateClient().GetAsync("http://localhost/SubFolder/extra.xml"); 118HttpResponseMessage resp2 = await server.CreateClient().SendAsync(req2); 128HttpResponseMessage resp1 = await server.CreateClient().GetAsync("http://localhost/SubFolder/extra.xml"); 132HttpResponseMessage resp2 = await server.CreateClient().SendAsync(req2); 142HttpResponseMessage resp1 = await server.CreateClient().GetAsync("http://localhost/SubFolder/extra.xml"); 146HttpResponseMessage resp2 = await server.CreateClient().SendAsync(req2); 167HttpResponseMessage response = await server.CreateClient().SendAsync( 190HttpResponseMessage resp1 = await server 194HttpResponseMessage resp2 = await server 209HttpResponseMessage resp1 = await server 214HttpResponseMessage resp2 = await server 221HttpResponseMessage resp3 = await server 235HttpResponseMessage resp1 = await server 243HttpResponseMessage resp2 = await server 249HttpResponseMessage resp3 = await server 255HttpResponseMessage resp4 = await server 285HttpResponseMessage res = await server 300HttpResponseMessage res = await server 322HttpResponseMessage res1 = await server 326HttpResponseMessage res2 = await server 340HttpResponseMessage res1 = await server 353HttpResponseMessage res2 = await server 369HttpResponseMessage res1 = await server 373HttpResponseMessage res2 = await server 388HttpResponseMessage res = await server 403HttpResponseMessage res = await server 418HttpResponseMessage res1 = await server 422HttpResponseMessage res2 = await server
DefaultFilesMiddlewareTests.cs (7)
26var response = await server.CreateClient().GetAsync("/"); 74var response = await server.CreateClient().GetAsync(requestUrl); 117var response = await server.CreateRequest("/SubFolder/").GetAsync(); 157var response = await server.CreateRequest("/SubFolder/").GetAsync(); 222var response = await server.CreateClient().GetAsync(requestUrl); 263var response = await server.CreateRequest(requestUrl + queryString).GetAsync(); 319var response = await server.CreateRequest(requestUrl).GetAsync();
DirectoryBrowserMiddlewareTests.cs (8)
47var response = await server.CreateClient().GetAsync("/"); 92var response = await server.CreateRequest(requestUrl).GetAsync(); 132var response = await server.CreateRequest("/").GetAsync(); 169var response = await server.CreateRequest("/").GetAsync(); 225var response = await server.CreateRequest(requestUrl).GetAsync(); 269var response = await server.CreateRequest(requestUrl + queryString).GetAsync(); 320var response = await server.CreateRequest(requestUrl).PostAsync(); 368var response = await server.CreateRequest(requestUrl).SendAsync("HEAD");
RangeHeaderTests.cs (32)
21HttpResponseMessage original = await server.CreateClient().GetAsync("http://localhost/SubFolder/ranges.txt"); 26HttpResponseMessage resp = await server.CreateClient().SendAsync(req); 42HttpResponseMessage original = await server.CreateClient().GetAsync("http://localhost/SubFolder/ranges.txt"); 47HttpResponseMessage resp = await server.CreateClient().SendAsync(req); 63HttpResponseMessage original = await server.CreateClient().GetAsync("http://localhost/SubFolder/ranges.txt"); 68HttpResponseMessage resp = await server.CreateClient().SendAsync(req); 80HttpResponseMessage original = await server.CreateClient().GetAsync("http://localhost/SubFolder/ranges.txt"); 85HttpResponseMessage resp = await server.CreateClient().SendAsync(req); 97HttpResponseMessage original = await server.CreateClient().GetAsync("http://localhost/SubFolder/ranges.txt"); 102HttpResponseMessage resp = await server.CreateClient().SendAsync(req); 114HttpResponseMessage original = await server.CreateClient().GetAsync("http://localhost/SubFolder/ranges.txt"); 119HttpResponseMessage resp = await server.CreateClient().SendAsync(req); 138HttpResponseMessage resp = await server.CreateClient().SendAsync(req); 155HttpResponseMessage resp = await server.CreateClient().SendAsync(req); 169HttpResponseMessage original = await server.CreateClient().GetAsync("http://localhost/SubFolder/ranges.txt"); 174HttpResponseMessage resp = await server.CreateClient().SendAsync(req); 188HttpResponseMessage original = await server.CreateClient().GetAsync("http://localhost/SubFolder/ranges.txt"); 193HttpResponseMessage resp = await server.CreateClient().SendAsync(req); 208HttpResponseMessage original = await server.CreateClient().GetAsync("http://localhost/SubFolder/ranges.txt"); 212HttpResponseMessage resp = await server.CreateClient().SendAsync(req); 235HttpResponseMessage original = await server.CreateClient().GetAsync("http://localhost/SubFolder/ranges.txt"); 239HttpResponseMessage resp = await server.CreateClient().SendAsync(req); 272HttpResponseMessage resp = await server.CreateClient().SendAsync(req); 293HttpResponseMessage resp = await server.CreateClient().SendAsync(req); 314HttpResponseMessage resp = await server.CreateClient().SendAsync(req); 328HttpResponseMessage resp = await server.CreateClient().SendAsync(req); 346HttpResponseMessage resp = await server.CreateClient().SendAsync(req); 361HttpResponseMessage resp = await server.CreateClient().SendAsync(req); 381HttpResponseMessage resp = await server.CreateClient().SendAsync(req); 403HttpResponseMessage resp = await server.CreateClient().SendAsync(req); 424HttpResponseMessage resp = await server.CreateClient().SendAsync(req); 444HttpResponseMessage resp = await server.CreateClient().SendAsync(req);
StaticFileMiddlewareTests.cs (15)
38var response = await server.CreateClient().GetAsync("/ranges.txt"); 72var response = await server.CreateClient().GetAsync(Path.GetFileName(badLink)); 112var response = await server.CreateClient().GetAsync("TestDocument.txt"); 129var response = await server.CreateRequest("TestDocument.txt").GetAsync(); 152var response = await server.CreateClient().GetAsync("/"); 186var response = await server.CreateRequest(requestUrl).GetAsync(); 225var response = await server.CreateRequest(requestUrl).GetAsync(); 267var response = await server.CreateRequest(requestUrl).GetAsync(); 317var response = await server.CreateRequest(requestUrl).GetAsync(); 360var response = await server.CreateRequest(requestUrl).GetAsync(); 408var response = await server.CreateRequest(requestUrl).GetAsync(); 431var response = await server.CreateClient().GetAsync("/"); 462var response = await server.CreateClient().GetAsync("/TestDocument.txt"); 479var response = await server.CreateRequest(requestUrl).SendAsync("HEAD"); 538var response = await server.CreateRequest(requestUrl).SendAsync(method);
Microsoft.AspNetCore.TestHost (10)
ClientHandler.cs (4)
58protected override HttpResponseMessage Send( 73/// <returns>A <see cref="Task{TResult}"/> returning the <see cref="HttpResponseMessage"/>.</returns> 74protected override async Task<HttpResponseMessage> SendAsync( 192var response = new HttpResponseMessage();
RequestBuilder.cs (6)
71/// <returns>The resulting <see cref="HttpResponseMessage"/>.</returns> 72public Task<HttpResponseMessage> SendAsync(string method) 81/// <returns>The resulting <see cref="HttpResponseMessage"/>.</returns> 82public Task<HttpResponseMessage> GetAsync() 91/// <returns>The resulting <see cref="HttpResponseMessage"/>.</returns> 92public Task<HttpResponseMessage> PostAsync()
Microsoft.AspNetCore.TestHost.Tests (47)
ClientHandlerTests.cs (11)
221var response = await invoker.SendAsync(message, CancellationToken.None); 363HttpResponseMessage response = await invoker.SendAsync(message, CancellationToken.None); 379HttpResponseMessage response = await httpClient.GetAsync("https://example.com/"); 393Task<HttpResponseMessage> task = httpClient.GetAsync("https://example.com/"); 399HttpResponseMessage response = await task; 414HttpResponseMessage response = await httpClient.GetAsync("https://example.com/", 433HttpResponseMessage response = await httpClient.GetAsync("https://example.com/", 451HttpResponseMessage response = await httpClient.GetAsync("https://example.com/", 473HttpResponseMessage response = await httpClient.GetAsync("https://example.com/", 496Task<HttpResponseMessage> responseTask; 532HttpResponseMessage response = await httpClient.GetAsync("https://example.com/",
RequestLifetimeTests.cs (2)
63var response = await client.GetAsync("/", HttpCompletionOption.ResponseHeadersRead); 86using var response = await client.GetAsync("/", HttpCompletionOption.ResponseHeadersRead);
ResponseBodyTests.cs (5)
27var response = await host.GetTestServer().CreateClient().GetAsync("/"); 44var response = await host.GetTestServer().CreateClient().GetAsync("/"); 79var response = await client.GetAsync("/"); 118var response = await client.GetAsync("/"); 137var response = await client.GetAsync("/", HttpCompletionOption.ResponseHeadersRead);
ResponseResetTests.cs (5)
30var response = await client.GetAsync("/"); 46var response = await client.GetAsync("/"); 62var response = await client.GetAsync("/"); 122var response = await client.GetAsync("/", HttpCompletionOption.ResponseHeadersRead); 148var response = await client.GetAsync("/", HttpCompletionOption.ResponseHeadersRead);
TestClientTests.cs (15)
99var response = await client.PutAsync("http://localhost:12345", content).DefaultTimeout(); 117var response = await client.PostAsync("http://localhost:12345", content).DefaultTimeout(); 152var response = await client.GetAsync("http://localhost:12345"); 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); 905var resp = await client.GetAsync("/"); 933var resp = await client.GetAsync("/"); 955var message = await client.SendAsync(request); 982var message = await client.SendAsync(request); 1009var message = await client.SendAsync(request);
TestServerTests.cs (9)
39var response = await host.GetTestServer().CreateClient().GetAsync("/"); 55var response = await host.GetTestServer().CreateClient().GetAsync("/"); 71var response = await host.GetTestClient().GetAsync("/"); 225var response = await server.CreateClient().PostAsync("/", new StreamContent(stream)); 654HttpResponseMessage result = await server.CreateClient().GetAsync("/"); 672HttpResponseMessage result = await server.CreateClient().GetAsync("/"); 702HttpResponseMessage result = await server.CreateClient().GetAsync("/"); 715HttpResponseMessage result = await server.CreateClient().GetAsync("/"); 793var response = await client.SendAsync(request);
Microsoft.AspNetCore.Testing.Tests (4)
FakesExtensionsTests.cs (1)
89using var response = await client.SendAsync(new HttpRequestMessage());
TestResources\ReturningHttpClientHandler.cs (2)
14protected override HttpResponseMessage Send(HttpRequestMessage request, CancellationToken cancellationToken) 20protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
TestResources\TestHandler.cs (1)
13protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request,
Microsoft.AspNetCore.Tests (9)
WebApplicationTests.cs (8)
1455var result = await client.GetAsync("http://localhost/"); 1604var oldResult = await client.GetAsync("http://localhost/old"); 1675var definedResult = await client.GetAsync("http://localhost/defined"); 1678var terminalResult = await client.GetAsync("http://localhost/undefined"); 1705var response = await client.GetAsync("http://localhost/1"); 2037var response = await client.GetAsync("/"); 2143var response = await client.GetAsync("/notAnInt"); 2168var response = await client.GetAsync("/notAnInt");
WebHostTests.cs (1)
82var result = await client.GetAsync("http://localhost/");
Microsoft.AspNetCore.WebSockets.ConformanceTests (2)
Autobahn\AutobahnTester.cs (2)
88var resp = await deployment.HttpClient.GetAsync("/ping", token); 161var resp = await RetryHelper.RetryRequest(() =>
Microsoft.AspNetCore.WebSockets.Tests (7)
WebSocketCompressionMiddlewareTests.cs (3)
39var response = await client.SendAsync(request); 67var response = await client.SendAsync(request); 101var response = await client.SendAsync(request);
WebSocketMiddlewareTests.cs (4)
686var response = await client.SendAsync(request); 712var response = await client.SendAsync(request); 769var response = await client.SendAsync(request); 840var response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead);
Microsoft.Build.Tasks.Core (4)
DownloadFile.cs (4)
153using (HttpResponseMessage response = await client.GetAsync(uri, HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false)) 311/// <param name="response">The <see cref="HttpResponseMessage"/> with information about the response.</param> 314private bool TryGetFileName(HttpResponseMessage response, out string filename) 349private bool ShouldSkip(HttpResponseMessage response, FileInfo destinationFile)
Microsoft.Build.Tasks.UnitTests (4)
DownloadFile_Tests.cs (4)
92using HttpResponseMessage response = new HttpResponseMessage(HttpStatusCode.OK) 391private readonly Func<HttpRequestMessage, CancellationToken, HttpResponseMessage> _func; 393public MockHttpMessageHandler(Func<HttpRequestMessage, CancellationToken, HttpResponseMessage> func) 398protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Microsoft.DotNet.Arcade.Sdk (1)
src\DownloadFile.cs (1)
154var httpResponse = await httpClient.GetAsync(uri, _cancellationSource.Token).ConfigureAwait(false);
Microsoft.DotNet.Build.Tasks.Feed (5)
src\common\AzureStorageUtils.cs (1)
255using (HttpResponseMessage response = await client.GetAsync(packageContentUrl))
src\common\GeneralUtils.cs (1)
151HttpResponseMessage response = await httpClient.GetAsync(feedUrl);
src\CreateAzureDevOpsFeed.cs (1)
150using HttpResponseMessage createFeedResponse = await client.SendAsync(createFeedMessage);
src\PublishArtifactsInManifestBase.cs (2)
907using HttpResponseMessage response = await client.GetAsync(uri, timeoutTokenSource.Token); 973using HttpResponseMessage response = await client.GetAsync(uri, HttpCompletionOption.ResponseHeadersRead, timeoutTokenSource.Token);
Microsoft.DotNet.Build.Tasks.Feed.Tests (3)
GeneralTests.cs (1)
118var response = new HttpResponseMessage(feedResponseStatusCode);
PublishToSymbolServerTest.cs (2)
239var response = new HttpResponseMessage(HttpStatusCode.OK) 398var responses = new HttpResponseMessage(HttpStatusCode.OK)
Microsoft.DotNet.Deployment.Tasks.Links (3)
Microsoft.DotNet.Git.IssueManager (1)
Clients\AzureDevOpsClient.cs (1)
35HttpResponseMessage response = await httpClient.SendAsync(getMessage);
Microsoft.DotNet.Helix.Sdk (18)
AzureDevOpsTask.cs (2)
121protected async Task HandleFailedRequest(HttpRequestMessage req, HttpResponseMessage res) 146protected async Task<JObject> ParseResponseAsync(HttpRequestMessage req, HttpResponseMessage res)
CheckAzurePipelinesTestResults.cs (4)
61using HttpResponseMessage res = await client.SendAsync(req); 115using HttpResponseMessage res = await client.SendAsync(req); 169using (HttpResponseMessage res = await client.SendAsync(req)) 213using (HttpResponseMessage res = await client.SendAsync(req))
CreateFailedTestsForFailedWorkItems.cs (1)
68using (HttpResponseMessage res = await client.SendAsync(req))
FindDotNetCliPackage.cs (8)
106using HttpResponseMessage res = await HeadRequestWithRetry(downloadUrl); 207using HttpResponseMessage specificResponse = await GetAsyncWithRetry($"{baseUri}/{customVersionTextFileName}", sasToken); 211using HttpResponseMessage genericResponse = await GetAsyncWithRetry($"{baseUri}/productVersion.txt", sasToken); 230private async Task<HttpResponseMessage> GetAsyncWithRetry(string uri, string sasToken = null) 232HttpResponseMessage response = null; 259private async Task<HttpResponseMessage> HeadRequestWithRetry(string uri) 261HttpResponseMessage response = null; 337using HttpResponseMessage versionResponse = await GetAsyncWithRetry(latestVersionUrl, sasToken);
ProvisioningProfileProvider.cs (1)
194HttpResponseMessage? response = null;
StartAzurePipelinesTestRun.cs (1)
53using (var res = await client.SendAsync(req))
StopAzurePipelinesTestRun.cs (1)
39using (var res = await client.SendAsync(req))
Microsoft.DotNet.Internal.SymbolHelper (4)
SymbolPromotionHelper.cs (3)
155using HttpResponseMessage regResponse = await s_client.SendAsync(registerRequest, ct); 208using HttpResponseMessage statusResponse = await s_client.SendAsync(statusRequest, ct); 271using HttpResponseMessage statusResponse = await s_client.SendAsync(statusRequest, ct);
SymbolUploadHelperFactory.cs (1)
155using HttpResponseMessage response = await s_symbolDownloadClient.SendAsync(getToolRequest, token).ConfigureAwait(false);
Microsoft.DotNet.VersionTools (31)
Automation\GitHubApi\GitHubClient.cs (17)
74using (HttpResponseMessage response = await _httpClient.GetAsync(url)) 141using (HttpResponseMessage response = await _httpClient.PutAsync(fileUrl, bodyContent)) 169using (HttpResponseMessage response = await _httpClient.PostAsync(pullUrl, bodyContent)) 212using (HttpResponseMessage response = await _httpClient.SendAsync(request)) 233using (HttpResponseMessage response = await _httpClient.GetAsync(queryUrl)) 257using (HttpResponseMessage response = await _httpClient.GetAsync(pullRequestUrl)) 267using (HttpResponseMessage response = await _httpClient.GetAsync(url)) 286using (HttpResponseMessage response = await _httpClient.PostAsync(url, bodyContent)) 296using (HttpResponseMessage response = await _httpClient.GetAsync(url)) 307using (HttpResponseMessage response = await _httpClient.GetAsync(url)) 327using (HttpResponseMessage response = await _httpClient.PostAsync(url, bodyContent)) 352using (HttpResponseMessage response = await _httpClient.PostAsync(url, bodyContent)) 376using (HttpResponseMessage response = await _httpClient.SendAsync(request)) 400using (HttpResponseMessage response = await _httpClient.SendAsync(request)) 438private static async Task<T> DeserializeSuccessfulAsync<T>(HttpResponseMessage response) 447private static async Task EnsureSuccessfulAsync(HttpResponseMessage response) 470private static async Task<string> GetPullRequestUrlAsync(HttpResponseMessage response)
Automation\VstsApi\VstsAdapterClient.cs (10)
135using (HttpResponseMessage response = await _httpClient.PostAsync(pullUrl, bodyContent)) 177using (HttpResponseMessage response = await _httpClient.SendAsync(request)) 198using (HttpResponseMessage response = await _httpClient.GetAsync(url)) 271using (HttpResponseMessage response = await _httpClient.PostAsync(pullUrl, bodyContent)) 281using (HttpResponseMessage response = await _httpClient.GetAsync(url)) 313using (HttpResponseMessage response = await _httpClient.GetAsync(url)) 391using (HttpResponseMessage response = await _httpClient.GetAsync(url)) 415private static async Task<T> DeserializeSuccessfulAsync<T>(HttpResponseMessage response) 424private static async Task EnsureSuccessfulAsync(HttpResponseMessage response) 438private static async Task<string> GetPullRequestUrlAsync(HttpResponseMessage response)
BuildInfo.cs (4)
55using (HttpResponseMessage response = await GetBuildInfoFileAsync( 68using (HttpResponseMessage response = await GetBuildInfoFileAsync( 192private static async Task<HttpResponseMessage> GetBuildInfoFileAsync( 197HttpResponseMessage response = await client.GetAsync(url);
Microsoft.Extensions.Http (23)
HttpMessageHandlerBuilder.cs (1)
73/// of sending an <see cref="HttpRequestMessage"/> and receiving an <see cref="HttpResponseMessage"/>.
Logging\HttpClientLoggerHandler.cs (4)
25protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 30HttpResponseMessage? response = null; 65protected override HttpResponseMessage Send(HttpRequestMessage request, CancellationToken cancellationToken) 70HttpResponseMessage? response = null;
Logging\IHttpClientAsyncLogger.cs (3)
24/// <see cref="HttpResponseMessage"/> properties, such as reading from a content stream; if possible, such behavior should be avoided. 51ValueTask LogRequestStopAsync(object? context, HttpRequestMessage request, HttpResponseMessage response, TimeSpan elapsed, CancellationToken cancellationToken = default); 63ValueTask LogRequestFailedAsync(object? context, HttpRequestMessage request, HttpResponseMessage? response, Exception exception, TimeSpan elapsed, CancellationToken cancellationToken = default);
Logging\IHttpClientLogger.cs (3)
16/// <see cref="HttpResponseMessage"/> properties, such as reading from a content stream; if possible, such behavior should be avoided. 39void LogRequestStop(object? context, HttpRequestMessage request, HttpResponseMessage response, TimeSpan elapsed); 49void LogRequestFailed(object? context, HttpRequestMessage request, HttpResponseMessage? response, Exception exception, TimeSpan elapsed);
Logging\LoggingHttpMessageHandler.cs (5)
49private Task<HttpResponseMessage> SendCoreAsync(HttpRequestMessage request, bool useAsync, CancellationToken cancellationToken) 54async Task<HttpResponseMessage> Core(HttpRequestMessage request, bool useAsync, CancellationToken cancellationToken) 65HttpResponseMessage response = useAsync 86protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 92protected override HttpResponseMessage Send(HttpRequestMessage request, CancellationToken cancellationToken)
Logging\LoggingScopeHttpMessageHandler.cs (5)
48private Task<HttpResponseMessage> SendCoreAsync(HttpRequestMessage request, bool useAsync, CancellationToken cancellationToken) 53async Task<HttpResponseMessage> Core(HttpRequestMessage request, bool useAsync, CancellationToken cancellationToken) 65HttpResponseMessage response = useAsync 87protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 93protected override HttpResponseMessage Send(HttpRequestMessage request, CancellationToken cancellationToken)
Logging\LogHelper.cs (2)
114public static void LogRequestEnd(this ILogger logger, HttpResponseMessage response, TimeSpan duration, Func<string, bool> shouldRedactHeaderValue) 153public static void LogRequestPipelineEnd(this ILogger logger, HttpResponseMessage response, TimeSpan duration, Func<string, bool> shouldRedactHeaderValue)
Microsoft.Extensions.Http.Diagnostics (22)
Latency\Internal\HttpClientLatencyLogEnricher.cs (1)
35public void Enrich(IEnrichmentTagCollector collector, HttpRequestMessage request, HttpResponseMessage? response, Exception? exception)
Latency\Internal\HttpLatencyTelemetryHandler.cs (2)
43protected async override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 51var response = await base.SendAsync(request, cancellationToken).ConfigureAwait(false);
Logging\IHttpClientLogEnricher.cs (2)
20/// <param name="response"><see cref="HttpResponseMessage"/> object associated with the outgoing HTTP request.</param> 26void Enrich(IEnrichmentTagCollector collector, HttpRequestMessage request, HttpResponseMessage? response, Exception? exception);
Logging\Internal\HttpClientLogger.cs (6)
115HttpResponseMessage response, 123HttpResponseMessage? response, 132public void LogRequestStop(object? context, HttpRequestMessage request, HttpResponseMessage response, TimeSpan elapsed) 135public void LogRequestFailed(object? context, HttpRequestMessage request, HttpResponseMessage? response, Exception exception, TimeSpan elapsed) 156HttpResponseMessage? response, 224HttpRequestMessage request, HttpResponseMessage? response, Exception? exception)
Logging\Internal\HttpHeadersReader.cs (1)
55public void ReadResponseHeaders(HttpResponseMessage response, List<KeyValuePair<string, string>>? destination)
Logging\Internal\HttpRequestReader.cs (1)
116public async Task ReadResponseAsync(LogRecord logRecord, HttpResponseMessage response,
Logging\Internal\HttpResponseBodyReader.cs (3)
44public ValueTask<string> ReadAsync(HttpResponseMessage response, CancellationToken cancellationToken) 61private static async ValueTask<string> ReadFromStreamAsync(HttpResponseMessage response, int readSizeLimit, 125private static async ValueTask<string> ReadFromStreamWithTimeoutAsync(HttpResponseMessage response, TimeSpan readTimeout,
Logging\Internal\IHttpHeadersReader.cs (2)
24/// <param name="response">An instance of <see cref="HttpResponseMessage"/> to read headers from.</param> 26void ReadResponseHeaders(HttpResponseMessage response, List<KeyValuePair<string, string>>? destination);
Logging\Internal\IHttpRequestReader.cs (3)
12/// Methods to read <see cref="HttpResponseMessage"/> or <see cref="HttpRequestMessage"/>. 17/// Reads <see cref="HttpResponseMessage"/>. 24Task ReadResponseAsync(LogRecord record, HttpResponseMessage response,
Logging\Internal\Log.cs (1)
12/// Logs <see cref="HttpRequestMessage"/>, <see cref="HttpResponseMessage"/> and the exceptions due to errors of request/response.
Microsoft.Extensions.Http.Diagnostics.PerformanceTests (101)
BenchEnricher.cs (1)
15public void Enrich(IEnrichmentTagCollector collector, HttpRequestMessage request, HttpResponseMessage? response, Exception? exception)
Benchmarks\HugeHttpCLientLoggingBenchmark.cs (32)
45public async Task<HttpResponseMessage> Huge_No_Log_HeadersRead() 47var response = await _hugeNoLog.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 55public async Task<HttpResponseMessage> Huge_No_Log_ContentRead() 57var response = await _hugeNoLog.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 65public async Task<HttpResponseMessage> Huge_Log_All_HeadersRead() 67var response = await _hugeLogAll.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 75public async Task<HttpResponseMessage> Huge_Log_All_ContentRead() 77var response = await _hugeLogAll.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 85public async Task<HttpResponseMessage> Huge_Log_Request_HeadersRead() 87var response = await _hugeLogRequest.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 95public async Task<HttpResponseMessage> Huge_Log_Request_ContentRead() 97var response = await _hugeLogRequest.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 105public async Task<HttpResponseMessage> Huge_Log_Response_HeadersRead() 107var response = await _hugeLogResponse.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 115public async Task<HttpResponseMessage> Huge_Log_Response_ContentRead() 117var response = await _hugeLogResponse.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 125public async Task<HttpResponseMessage> Huge_No_Log_HeadersRead_ChunkedEncoding() 127var response = await _hugeNoLogChunked.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 135public async Task<HttpResponseMessage> Huge_No_Log_ContentRead_ChunkedEncoding() 137var response = await _hugeNoLogChunked.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 145public async Task<HttpResponseMessage> Huge_Log_All_HeadersRead_ChunkedEncoding() 147var response = await _hugeLogAllChunked.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 155public async Task<HttpResponseMessage> Huge_Log_All_ContentRead_ChunkedEncoding() 157var response = await _hugeLogAllChunked.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 165public async Task<HttpResponseMessage> Huge_Log_Request_HeadersRead_ChunkedEncoding() 167var response = await _hugeLogRequestChunked.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 175public async Task<HttpResponseMessage> Huge_Log_Request_ContentRead_ChunkedEncoding() 177var response = await _hugeLogRequestChunked.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 185public async Task<HttpResponseMessage> Huge_Log_Response_HeadersRead_ChunkedEncoding() 187var response = await _hugeLogResponseChunked.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 195public async Task<HttpResponseMessage> Huge_Log_Response_ContentRead_ChunkedEncoding() 197var response = await _hugeLogResponseChunked.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None)
Benchmarks\MediumHttpClientLoggingBenchmark.cs (32)
45public async Task<HttpResponseMessage> Medium_No_Log_HeadersRead() 47var response = await _mediumNoLog.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 55public async Task<HttpResponseMessage> Medium_No_Log_ContentRead() 57var response = await _mediumNoLog.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 65public async Task<HttpResponseMessage> Medium_Log_All_HeadersRead() 67var response = await _mediumLogAll.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 75public async Task<HttpResponseMessage> Medium_Log_All_ContentRead() 77var response = await _mediumLogAll.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 85public async Task<HttpResponseMessage> Medium_Log_Request_HeadersRead() 87var response = await _mediumLogRequest.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 95public async Task<HttpResponseMessage> Medium_Log_Request_ContentRead() 97var response = await _mediumLogRequest.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 105public async Task<HttpResponseMessage> Medium_Log_Response_HeadersRead() 107var response = await _mediumLogResponse.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 115public async Task<HttpResponseMessage> Medium_Log_Response_ContentRead() 117var response = await _mediumLogResponse.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 125public async Task<HttpResponseMessage> Medium_No_Log_HeadersRead_ChunkedEncoding() 127var response = await _mediumNoLogChunked.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 135public async Task<HttpResponseMessage> Medium_No_Log_ContentRead_ChunkedEncoding() 137var response = await _mediumNoLogChunked.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 145public async Task<HttpResponseMessage> Medium_Log_All_HeadersRead_ChunkedEncoding() 147var response = await _mediumLogAllChunked.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 155public async Task<HttpResponseMessage> Medium_Log_All_ContentRead_ChunkedEncoding() 157var response = await _mediumLogAllChunked.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 165public async Task<HttpResponseMessage> Medium_Log_Request_HeadersRead_ChunkedEncoding() 167var response = await _mediumLogRequestChunked.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 175public async Task<HttpResponseMessage> Medium_Log_Request_ContentRead_ChunkedEncoding() 177var response = await _mediumLogRequestChunked.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 185public async Task<HttpResponseMessage> Medium_Log_Response_HeadersRead_ChunkedEncoding() 187var response = await _mediumLogResponseChunked.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 195public async Task<HttpResponseMessage> Medium_Log_Response_ContentRead_ChunkedEncoding() 197var response = await _mediumLogResponseChunked.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None)
Benchmarks\SmallHttpClientLoggingBenchmark.cs (32)
45public async Task<HttpResponseMessage> Small_No_Log_HeadersRead() 47var response = await _smallNoLog.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 55public async Task<HttpResponseMessage> Small_No_Log_ContentRead() 57var response = await _smallNoLog.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 65public async Task<HttpResponseMessage> Small_Log_All_HeadersRead() 67var response = await _smallLogAll.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 75public async Task<HttpResponseMessage> Small_Log_All_ContentRead() 77var response = await _smallLogAll.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 85public async Task<HttpResponseMessage> Small_Log_Request_HeadersRead() 87var response = await _smallLogRequest.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 95public async Task<HttpResponseMessage> Small_Log_Request_ContentRead() 97var response = await _smallLogRequest.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 105public async Task<HttpResponseMessage> Small_Log_Response_HeadersRead() 107var response = await _smallLogResponse.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 115public async Task<HttpResponseMessage> Small_Log_Response_ContentRead() 117var response = await _smallLogResponse.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 125public async Task<HttpResponseMessage> Small_No_Log_HeadersRead_ChunkedEncoding() 127var response = await _smallNoLogChunked.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 135public async Task<HttpResponseMessage> Small_No_Log_ContentRead_ChunkedEncoding() 137var response = await _smallNoLogChunked.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 145public async Task<HttpResponseMessage> Small_Log_All_HeadersRead_ChunkedEncoding() 147var response = await _smallLogAllChunked.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 155public async Task<HttpResponseMessage> Small_Log_All_ContentRead_ChunkedEncoding() 157var response = await _smallLogAllChunked.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 165public async Task<HttpResponseMessage> Small_Log_Request_HeadersRead_ChunkedEncoding() 167var response = await _smallLogRequestChunked.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 175public async Task<HttpResponseMessage> Small_Log_Request_ContentRead_ChunkedEncoding() 177var response = await _smallLogRequestChunked.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 185public async Task<HttpResponseMessage> Small_Log_Response_HeadersRead_ChunkedEncoding() 187var response = await _smallLogResponseChunked.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 195public async Task<HttpResponseMessage> Small_Log_Response_ContentRead_ChunkedEncoding() 197var response = await _smallLogResponseChunked.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None)
NoRemoteCallHandler.cs (2)
35protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 37var response = new HttpResponseMessage
NoRemoteCallNotSeekableHandler.cs (2)
38protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 40var response = new HttpResponseMessage
Microsoft.Extensions.Http.Diagnostics.Tests (62)
Latency\Internal\HttpClientLatencyLogEnricherTest.cs (2)
45using HttpResponseMessage httpResponseMessage = new(); 65using HttpResponseMessage httpResponseMessage = new();
Latency\Internal\HttpLatencyTelemetryHandlerTest.cs (2)
63var resp = new Mock<HttpResponseMessage>(); 65mockHandler.Protected().Setup<Task<HttpResponseMessage>>(
Logging\AcceptanceTests.cs (7)
40using var _ = await httpClient.GetAsync(_unreachableRequestUri); 71using var _ = await httpClient.GetAsync(_unreachableRequestUri); 197using var content = await httpClient 251var content = await firstClient!.SendRequest(httpRequestMessage); 363using var _ = await httpClient.SendAsync(httpRequestMessage); 432using var _ = await httpClient.SendAsync(httpRequestMessage); 688var content = await client.SendAsync(httpRequestMessage, HttpCompletionOption.ResponseHeadersRead);
Logging\HttpClientLoggerTest.cs (21)
55using var httpResponseMessage = new HttpResponseMessage { StatusCode = responseCode }; 193using var httpResponseMessage = new HttpResponseMessage 287using var httpResponseMessage = new HttpResponseMessage 393using var httpResponseMessage = new HttpResponseMessage 489using var httpResponseMessage = new HttpResponseMessage 537It.IsAny<HttpResponseMessage>(), 603using var httpResponseMessage = new HttpResponseMessage 699enricher1.Verify(e => e.Enrich(It.IsAny<IEnrichmentTagCollector>(), It.IsAny<HttpRequestMessage>(), It.IsAny<HttpResponseMessage>(), It.IsAny<Exception>()), Times.Exactly(1)); 700enricher2.Verify(e => e.Enrich(It.IsAny<IEnrichmentTagCollector>(), It.IsAny<HttpRequestMessage>(), It.IsAny<HttpResponseMessage>(), It.IsAny<Exception>()), Times.Exactly(1)); 742enricher1.Verify(e => e.Enrich(It.IsAny<IEnrichmentTagCollector>(), It.IsAny<HttpRequestMessage>(), It.IsAny<HttpResponseMessage>(), It.IsAny<Exception>()), Times.Exactly(1)); 743enricher2.Verify(e => e.Enrich(It.IsAny<IEnrichmentTagCollector>(), It.IsAny<HttpRequestMessage>(), It.IsAny<HttpResponseMessage>(), It.IsAny<Exception>()), Times.Exactly(1)); 752.Setup(e => e.Enrich(It.IsAny<IEnrichmentTagCollector>(), It.IsAny<HttpRequestMessage>(), It.IsAny<HttpResponseMessage>(), It.IsAny<Exception>())) 785enricher1.Verify(e => e.Enrich(It.IsAny<IEnrichmentTagCollector>(), It.IsAny<HttpRequestMessage>(), It.IsAny<HttpResponseMessage>(), It.IsAny<Exception>()), Times.Exactly(1)); 786enricher2.Verify(e => e.Enrich(It.IsAny<IEnrichmentTagCollector>(), It.IsAny<HttpRequestMessage>(), It.IsAny<HttpResponseMessage>(), It.IsAny<Exception>()), Times.Exactly(1)); 795.Setup(e => e.Enrich(It.IsAny<IEnrichmentTagCollector>(), It.IsAny<HttpRequestMessage>(), It.IsAny<HttpResponseMessage>(), It.IsAny<Exception>())) 831enricher1.Verify(e => e.Enrich(It.IsAny<IEnrichmentTagCollector>(), It.IsAny<HttpRequestMessage>(), It.IsAny<HttpResponseMessage>(), It.IsAny<Exception>()), Times.Exactly(1)); 832enricher2.Verify(e => e.Enrich(It.IsAny<IEnrichmentTagCollector>(), It.IsAny<HttpRequestMessage>(), It.IsAny<HttpResponseMessage>(), It.IsAny<Exception>()), Times.Exactly(1)); 873using var httpResponseMessage = new HttpResponseMessage 976.Setup(r => r.ReadResponseAsync(It.IsAny<LogRecord>(), It.IsAny<HttpResponseMessage>(), It.IsAny<List<KeyValuePair<string, string>>?>(), It.IsAny<CancellationToken>())) 983using var httpResponseMessage = new HttpResponseMessage(); 1002using var httpResponseMessage = new HttpResponseMessage();
Logging\HttpHeadersReaderTest.cs (4)
24using var httpResponse = new HttpResponseMessage(); 42using var httpResponse = new HttpResponseMessage(); 145using var httpResponse = new HttpResponseMessage { Content = responseContent }; 178using var httpResponse = new HttpResponseMessage();
Logging\HttpRequestReaderTest.cs (7)
90using var httpResponseMessage = new HttpResponseMessage 150using var httpResponseMessage = new HttpResponseMessage 219using var httpResponseMessage = new HttpResponseMessage 294using var httpResponseMessage = new HttpResponseMessage 424using var httpResponseMessage = new HttpResponseMessage 491using var httpResponseMessage = new HttpResponseMessage 559using var httpResponseMessage = new HttpResponseMessage
Logging\HttpResponseBodyReaderTest.cs (6)
40using var httpResponse = new HttpResponseMessage 58using var httpResponse = new HttpResponseMessage 83using var httpResponse = new HttpResponseMessage 103using var httpResponse = new HttpResponseMessage 127using var httpResponse = new HttpResponseMessage 152using var httpResponse = new HttpResponseMessage
Logging\Internal\EmptyEnricher.cs (1)
12public void Enrich(IEnrichmentTagCollector collector, HttpRequestMessage request, HttpResponseMessage? response, Exception? exception)
Logging\Internal\EnricherWithCounter.cs (1)
14public void Enrich(IEnrichmentTagCollector collector, HttpRequestMessage request, HttpResponseMessage? response, Exception? exception)
Logging\Internal\ITestHttpClient1.cs (1)
11Task<HttpResponseMessage> SendRequest(HttpRequestMessage httpRequestMessage);
Logging\Internal\ITestHttpClient2.cs (1)
11Task<HttpResponseMessage> SendRequest(HttpRequestMessage httpRequestMessage);
Logging\Internal\MockedRequestReader.cs (1)
23HttpResponseMessage response,
Logging\Internal\NoRemoteCallHandler.cs (2)
29protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 31var response = new HttpResponseMessage
Logging\Internal\TestEnricher.cs (1)
29public void Enrich(IEnrichmentTagCollector tagCollector, HttpRequestMessage request, HttpResponseMessage? response, Exception? exception)
Logging\Internal\TestHttpClient1.cs (1)
18public Task<HttpResponseMessage> SendRequest(HttpRequestMessage httpRequestMessage)
Logging\Internal\TestHttpClient2.cs (1)
18public Task<HttpResponseMessage> SendRequest(HttpRequestMessage httpRequestMessage)
Logging\Internal\TestingHandlerStub.cs (3)
13private readonly Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> _handlerFunc; 15public TestingHandlerStub(Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> handlerFunc) 20protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) => _handlerFunc(request, cancellationToken);
Microsoft.Extensions.Http.Polly (24)
DependencyInjection\PollyHttpClientBuilderExtensions.cs (10)
31public static IHttpClientBuilder AddPolicyHandler(this IHttpClientBuilder builder, IAsyncPolicy<HttpResponseMessage> policy) 63Func<HttpRequestMessage, IAsyncPolicy<HttpResponseMessage>> policySelector) 95Func<IServiceProvider, HttpRequestMessage, IAsyncPolicy<HttpResponseMessage>> policySelector) 144var policy = registry.Get<IAsyncPolicy<HttpResponseMessage>>(policyKey); 167Func<IReadOnlyPolicyRegistry<string>, HttpRequestMessage, IAsyncPolicy<HttpResponseMessage>> policySelector) 212/// <see cref="AddPolicyHandler(IHttpClientBuilder, IAsyncPolicy{HttpResponseMessage})"/> as desired. 217Func<PolicyBuilder<HttpResponseMessage>, IAsyncPolicy<HttpResponseMessage>> configurePolicy) 254public static IHttpClientBuilder AddPolicyHandler(this IHttpClientBuilder builder, Func<IServiceProvider, HttpRequestMessage, string, IAsyncPolicy<HttpResponseMessage>> policyFactory, Func<HttpRequestMessage, string> keySelector) 278if (registry.TryGet<IAsyncPolicy<HttpResponseMessage>>(key, out var policy))
HttpRequestMessageExtensions.cs (2)
25/// The <see cref="PolicyHttpMessageHandler"/> will attach a context to the <see cref="HttpResponseMessage"/> prior 46/// The <see cref="PolicyHttpMessageHandler"/> will attach a context to the <see cref="HttpResponseMessage"/> prior
PolicyHttpMessageHandler.cs (12)
30/// The <see cref="PollyHttpClientBuilderExtensions.AddPolicyHandler(IHttpClientBuilder, IAsyncPolicy{HttpResponseMessage})"/> 49/// The <see cref="PollyHttpClientBuilderExtensions.AddTransientHttpErrorPolicy(IHttpClientBuilder, Func{PolicyBuilder{HttpResponseMessage}, IAsyncPolicy{HttpResponseMessage}})"/> 77private readonly IAsyncPolicy<HttpResponseMessage> _policy; 78private readonly Func<HttpRequestMessage, IAsyncPolicy<HttpResponseMessage>> _policySelector; 84public PolicyHttpMessageHandler(IAsyncPolicy<HttpResponseMessage> policy) 98public PolicyHttpMessageHandler(Func<HttpRequestMessage, IAsyncPolicy<HttpResponseMessage>> policySelector) 109protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 127HttpResponseMessage response; 151protected virtual async Task<HttpResponseMessage> SendCoreAsync(HttpRequestMessage request, Context context, CancellationToken cancellationToken) 170var result = await base.SendAsync(request, cancellationToken).ConfigureAwait(false); 177private IAsyncPolicy<HttpResponseMessage> SelectPolicy(HttpRequestMessage request)
Microsoft.Extensions.Http.Polly.Tests (56)
DependencyInjection\PollyHttpClientBuilderExtensionsTest.cs (23)
26NoOpPolicy = Policy.NoOpAsync<HttpResponseMessage>(); 27RetryPolicy = Policy.Handle<OverflowException>().OrResult<HttpResponseMessage>(r => false).RetryAsync(); 33private IAsyncPolicy<HttpResponseMessage> NoOpPolicy { get; } 36private IAsyncPolicy<HttpResponseMessage> RetryPolicy { get; } 67var response = await client.SendAsync(new HttpRequestMessage()); 102var response = await client.SendAsync(new HttpRequestMessage()); 140var response = await client.SendAsync(new HttpRequestMessage()); 155registry.Add<IAsyncPolicy<HttpResponseMessage>>("retry", RetryPolicy); 181var response = await client.SendAsync(new HttpRequestMessage()); 193registry.Add<IAsyncPolicy<HttpResponseMessage>>("noop", NoOpPolicy); 194registry.Add<IAsyncPolicy<HttpResponseMessage>>("retry", RetryPolicy); 203reg.Get<IAsyncPolicy<HttpResponseMessage>>("retry") : 204reg.Get<IAsyncPolicy<HttpResponseMessage>>("noop"); 225var response = await client.SendAsync(new HttpRequestMessage()); 278var response = await client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "/")); 323var response = await client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "/")); 367var response = await client.SendAsync(request); 410registry.Add<IAsyncPolicy<HttpResponseMessage>>(policyName, RetryPolicy); 437var response = await client.SendAsync(new HttpRequestMessage()); 561protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 578public List<Func<HttpRequestMessage, HttpResponseMessage>> Responses { get; } = new List<Func<HttpRequestMessage, HttpResponseMessage>>(); 580protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
PolicyHttpMessageHandlerTest.cs (33)
22var policy = Policy<HttpResponseMessage> 29var expected = new HttpResponseMessage(); 49var response = await handler.SendAsync(new HttpRequestMessage(), CancellationToken.None); 60var policy = Policy<HttpResponseMessage> 74var expected = new HttpResponseMessage(); 94var response = await handler.SendAsync(expectedRequest, CancellationToken.None); 111var firstResponse = new HttpResponseMessage() 116var expected = new HttpResponseMessage(); 142var response = await invoke.SendAsync(new HttpRequestMessage(), CancellationToken.None); 161var firstResponse = new HttpResponseMessage() 166var expected = new HttpResponseMessage(); 194var response = await invoke.SendAsync(new HttpRequestMessage(), CancellationToken.None); 211var expected = new HttpResponseMessage(); 229var policy = Policy<HttpResponseMessage> 233.TimeoutAsync<HttpResponseMessage>(TimeSpan.FromMilliseconds(50)) // Apply a 50ms timeout 234.WrapAsync(Policy.NoOpAsync<HttpResponseMessage>())); 241var expected = new HttpResponseMessage(); 264var response = await handler.SendAsync(new HttpRequestMessage(), CancellationToken.None); 275var policy = Policy.TimeoutAsync<HttpResponseMessage>(TimeSpan.FromSeconds(10)); 279var expected = new HttpResponseMessage(); 291var response = await handler.SendAsync(request, CancellationToken.None); 303var policy = Policy.TimeoutAsync<HttpResponseMessage>(TimeSpan.FromSeconds(10)); 306var expected = new HttpResponseMessage(); 322var response = await handler.SendAsync(request, CancellationToken.None); 355var policy = Policy.TimeoutAsync<HttpResponseMessage>(TimeSpan.FromSeconds(10)); 382var policy = Policy.TimeoutAsync<HttpResponseMessage>(TimeSpan.FromSeconds(10)); 414public Func<HttpRequestMessage, Context, CancellationToken, Task<HttpResponseMessage>> OnSendAsync { get; set; } 416public TestPolicyHttpMessageHandler(IAsyncPolicy<HttpResponseMessage> policy) 421public TestPolicyHttpMessageHandler(Func<HttpRequestMessage, IAsyncPolicy<HttpResponseMessage>> policySelector) 426public new Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 431protected override Task<HttpResponseMessage> SendCoreAsync(HttpRequestMessage request, Context context, CancellationToken cancellationToken) 440public Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> OnSendAsync { get; set; } 442protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Microsoft.Extensions.Http.Resilience (37)
Hedging\HttpClientHedgingResiliencePredicates.cs (3)
25public static bool IsTransient(Outcome<HttpResponseMessage> outcome) 34/// Determines whether an <see cref="HttpResponseMessage"/> should be treated by hedging as a transient failure. 40public static bool IsTransient(Outcome<HttpResponseMessage> outcome, CancellationToken cancellationToken)
Hedging\HttpHedgingStrategyOptions.cs (2)
13/// Implementation of the <see cref="HedgingStrategyOptions{TResult}"/> class for <see cref="HttpResponseMessage"/> results. 15public class HttpHedgingStrategyOptions : HedgingStrategyOptions<HttpResponseMessage>
Internal\RetryAfterHelper.cs (1)
16internal static bool TryParse(HttpResponseMessage response, TimeProvider timeProvider, out TimeSpan retryAfter)
Polly\HttpCircuitBreakerStrategyOptions.cs (2)
11/// Implementation of the <see cref="CircuitBreakerStrategyOptions{TResult}"/> for <see cref="HttpResponseMessage"/> results. 13public class HttpCircuitBreakerStrategyOptions : CircuitBreakerStrategyOptions<HttpResponseMessage>
Polly\HttpClientResiliencePredicates.cs (5)
25public static bool IsTransient(Outcome<HttpResponseMessage> outcome) => outcome switch 33/// Determines whether an <see cref="HttpResponseMessage"/> should be treated by resilience strategies as a transient failure. 39public static bool IsTransient(Outcome<HttpResponseMessage> outcome, CancellationToken cancellationToken) 53internal static bool IsHttpConnectionTimeout(in Outcome<HttpResponseMessage> outcome, in CancellationToken cancellationToken) 63internal static bool IsTransientHttpFailure(HttpResponseMessage response)
Polly\HttpRetryStrategyOptions.cs (3)
15/// Implementation of the <see cref="RetryStrategyOptions{TResult}"/> for <see cref="HttpResponseMessage"/> results. 17public class HttpRetryStrategyOptions : RetryStrategyOptions<HttpResponseMessage> 59HttpResponseMessage response when RetryAfterHelper.TryParse(response, TimeProvider.System, out var retryAfter) => new ValueTask<TimeSpan?>(retryAfter),
Resilience\Internal\HttpResilienceMetricsEnricher.cs (2)
14if (typeof(TResult) != typeof(HttpResponseMessage)) 19if (context.TelemetryEvent.Outcome.HasValue && context.TelemetryEvent.Outcome.Value.Result is HttpResponseMessage response)
Resilience\ResilienceHandler.cs (12)
23private readonly Func<HttpRequestMessage, ResiliencePipeline<HttpResponseMessage>> _pipelineProvider; 30public ResilienceHandler(Func<HttpRequestMessage, ResiliencePipeline<HttpResponseMessage>> pipelineProvider) 40public ResilienceHandler(ResiliencePipeline<HttpResponseMessage> pipeline) 53protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 57ResiliencePipeline<HttpResponseMessage> pipeline = _pipelineProvider(request); 65Outcome<HttpResponseMessage> outcome = await pipeline.ExecuteOutcomeAsync( 77HttpResponseMessage response = await state.instance 86return Outcome.FromException<HttpResponseMessage>(e); 112protected override HttpResponseMessage Send(HttpRequestMessage request, CancellationToken cancellationToken) 116ResiliencePipeline<HttpResponseMessage> pipeline = _pipelineProvider(request); 185private Task<HttpResponseMessage> SendCoreAsync(HttpRequestMessage requestMessage, CancellationToken cancellationToken) 189private HttpResponseMessage SendCore(HttpRequestMessage requestMessage, CancellationToken cancellationToken)
Resilience\ResilienceHttpClientBuilderExtensions.Resilience.cs (7)
36Action<ResiliencePipelineBuilder<HttpResponseMessage>> configure) 59Action<ResiliencePipelineBuilder<HttpResponseMessage>, ResilienceHandlerContext> configure) 78private static Func<HttpRequestMessage, ResiliencePipeline<HttpResponseMessage>> CreatePipelineSelector(IServiceProvider serviceProvider, string pipelineName) 85var pipeline = resilienceProvider.GetPipeline<HttpResponseMessage>(new HttpKey(pipelineName, string.Empty)); 95return resilienceProvider.GetPipeline<HttpResponseMessage>(new HttpKey(pipelineName, key)); 113Action<ResiliencePipelineBuilder<HttpResponseMessage>, ResilienceHandlerContext> configure) 118_ = builder.Services.AddResiliencePipeline<HttpKey, HttpResponseMessage>(key, (builder, context) => configure(builder, new ResilienceHandlerContext(context)));
Microsoft.Extensions.Http.Resilience.PerformanceTests (22)
EmptyHandler.cs (1)
12protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
HedgingBenchmark.cs (1)
37public Task<HttpResponseMessage> HedgingCall() => _client.SendAsync(Request, CancellationToken.None);
HttpResilienceBenchmark.cs (5)
46public Task<HttpResponseMessage> DefaultClient() 52public Task<HttpResponseMessage> SingleHandler() 58public Task<HttpResponseMessage> StandardResilienceHandler() 64public Task<HttpResponseMessage> StandardHedgingHandler_RoutesFromRequest() 70public Task<HttpResponseMessage> StandardHedgingHandler_RoutesFromConfig()
NoRemoteCallHandler.cs (4)
12private readonly HttpResponseMessage _response; 13private readonly Task<HttpResponseMessage> _completedResponse; 26protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 33protected override HttpResponseMessage Send(HttpRequestMessage request, CancellationToken cancellationToken)
RetryBenchmark.cs (4)
48var builder = Policy.Handle<HttpRequestException>().Or<TimeoutRejectedException>().OrResult<HttpResponseMessage>(r => 69public Task<HttpResponseMessage> Retry_Polly_V7() 75public Task<HttpResponseMessage> Retry_Polly_V8() 81public HttpResponseMessage Retry_Polly_V8_Sync()
StandardResilienceBenchmark.cs (7)
43var builder = Policy.Handle<HttpRequestException>().Or<TimeoutRejectedException>().OrResult<HttpResponseMessage>(r => 53Policy.TimeoutAsync<HttpResponseMessage>(3), 56Policy.BulkheadAsync<HttpResponseMessage>(1000, 100), 57Policy.TimeoutAsync<HttpResponseMessage>(30)); 71public Task<HttpResponseMessage> StandardPipeline_Polly_V7() 77public Task<HttpResponseMessage> StandardPipeline_Polly_V8() 83public HttpResponseMessage StandardPipeline_Polly_V8_Sync()
Microsoft.Extensions.Http.Resilience.Tests (85)
Hedging\HedgingTests.cs (11)
37private readonly Queue<HttpResponseMessage> _responses = new(); 68foreach (var response in _responses) 107using var _ = await SendRequest(client, request, asynchronous, _cancellationTokenSource.Token); 127using var _ = await SendRequest(client, request, asynchronous, _cancellationTokenSource.Token); 200using var result = await SendRequest(client, request, asynchronous, _cancellationTokenSource.Token); 224using var _ = await SendRequest(client, request, asynchronous, _cancellationTokenSource.Token); 250using var _ = await SendRequest(client, request, asynchronous, _cancellationTokenSource.Token); 277using var _ = await SendRequest(client, request, asynchronous, _cancellationTokenSource.Token); 300using var result = await SendRequest(client, request, asynchronous, _cancellationTokenSource.Token); 308protected static Task<HttpResponseMessage> SendRequest( 348private Task<HttpResponseMessage> InnerHandlerFunction(HttpRequestMessage request, CancellationToken cancellationToken)
Hedging\HttpClientHedgingResiliencePredicatesTests.cs (6)
29Assert.True(HttpClientHedgingResiliencePredicates.IsTransient(Outcome.FromException<HttpResponseMessage>(new TimeoutRejectedException()))); 30Assert.True(HttpClientHedgingResiliencePredicates.IsTransient(Outcome.FromException<HttpResponseMessage>(new BrokenCircuitException()))); 31Assert.True(HttpClientHedgingResiliencePredicates.IsTransient(Outcome.FromException<HttpResponseMessage>(new HttpRequestException()))); 32Assert.False(HttpClientHedgingResiliencePredicates.IsTransient(Outcome.FromException<HttpResponseMessage>(new InvalidOperationException()))); 33Assert.False(HttpClientHedgingResiliencePredicates.IsTransient(Outcome.FromResult<HttpResponseMessage>(null))); 42using var response = new HttpResponseMessage(code);
Hedging\StandardHedgingTests.cs (14)
116using var response = new HttpResponseMessage(HttpStatusCode.OK); 118var args = new HedgingActionGeneratorArguments<HttpResponseMessage>(primary, secondary, 0, _ => Outcome.FromResultAsValueTask(response)); 177var primary = pipelineProvider.GetPipeline<HttpResponseMessage>(new HttpKey("clientId-standard-hedging", "instance")).GetPipelineDescriptor(); 186var inner = pipelineProvider.GetPipeline<HttpResponseMessage>(new HttpKey("clientId-standard-hedging-endpoint", "instance")).GetPipelineDescriptor(); 206var noPolicy = ResiliencePipeline<HttpResponseMessage>.Empty; 219provider.Setup(v => v.GetPipeline<HttpResponseMessage>(new HttpKey("clientId-standard-hedging", string.Empty))).Returns(noPolicy); 220provider.Setup(v => v.GetPipeline<HttpResponseMessage>(new HttpKey("clientId-standard-hedging-endpoint", customKey))).Returns(noPolicy); 226using var response = await SendRequest(client, request, asynchronous); 257using var _ = await SendRequest(client, firstRequest, asynchronous); 264using var __ = await SendRequest(client, secondRequest, asynchronous); 292using var _ = await SendRequest(client, request, asynchronous); 342using var _ = await SendRequest(client, request, asynchronous); 352protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 365protected override HttpResponseMessage Send(HttpRequestMessage request, CancellationToken cancellationToken)
Helpers\TestHandlerStub.cs (4)
14private readonly Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> _handlerFunc; 21public TestHandlerStub(Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> handlerFunc) 26protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 32protected override HttpResponseMessage Send(HttpRequestMessage request, CancellationToken cancellationToken)
Internal\RequestMessageSnapshotStrategyTests.cs (1)
29return new ValueTask<HttpResponseMessage>(new HttpResponseMessage());
Internal\RetryAfterHelperTests.cs (4)
19using var response = new HttpResponseMessage(); 31using var response = new HttpResponseMessage(); 44using var response = new HttpResponseMessage(); 58using var response = new HttpResponseMessage();
Polly\HttpCircuitBreakerStrategyOptionsTests.cs (5)
59using var response = new HttpResponseMessage { StatusCode = statusCode }; 72private CircuitBreakerPredicateArguments<HttpResponseMessage> CreateArgs(Exception error) 73=> new(_context, Outcome.FromException<HttpResponseMessage>(error)); 75private CircuitBreakerPredicateArguments<HttpResponseMessage> CreateArgs(HttpResponseMessage response)
Polly\HttpClientResiliencePredicatesTests.cs (2)
39isTransientHttpException = HttpClientResiliencePredicates.IsTransient(Outcome.FromException<HttpResponseMessage>(ex)); 55var response = new HttpResponseMessage { StatusCode = statusCode };
Polly\HttpRetryStrategyOptionsTests.cs (10)
58var response = new HttpResponseMessage { StatusCode = statusCode }; 69var args = CreateArgs(Outcome.FromException<HttpResponseMessage>(exception), token ?? default); 83var response = new HttpResponseMessage { StatusCode = statusCode }; 93var args = CreateArgs(Outcome.FromException<HttpResponseMessage>(exception), token ?? default); 102using var responseMessage = new HttpResponseMessage(); 115Outcome.FromResult<HttpResponseMessage>(null), 121Outcome.FromException<HttpResponseMessage>(new InvalidOperationException()), 130using var responseMessage = new HttpResponseMessage 159private static RetryPredicateArguments<HttpResponseMessage> CreateArgs( 160Outcome<HttpResponseMessage> outcome,
Resilience\HttpClientBuilderExtensionsTests.BySelector.cs (2)
132.Setup(p => p.GetPipeline<HttpResponseMessage>(new HttpKey(pipelineName, expectedPipelineKey))) 133.Returns(ResiliencePipeline<HttpResponseMessage>.Empty);
Resilience\HttpClientBuilderExtensionsTests.Resilience.cs (10)
35Assert.Throws<ArgumentNullException>(() => builder.AddResilienceHandler("dummy", (Action<ResiliencePipelineBuilder<HttpResponseMessage>>)null!)); 36Assert.Throws<ArgumentNullException>(() => builder.AddResilienceHandler("dummy", (Action<ResiliencePipelineBuilder<HttpResponseMessage>, ResilienceHandlerContext>)null!)); 134using var response = await SendRequest(client, "https://dummy", asynchronous); 219.Setup(v => v.GetPipeline<HttpResponseMessage>(new HttpKey(expectedPipelineKey, "https://dummy1"))) 220.Returns(ResiliencePipeline<HttpResponseMessage>.Empty); 225.Setup(v => v.GetPipeline<HttpResponseMessage>(new HttpKey(expectedPipelineKey, string.Empty))) 226.Returns(ResiliencePipeline<HttpResponseMessage>.Empty); 259.Setup(v => v.GetPipeline<HttpResponseMessage>(new HttpKey(pipelineName, string.Empty))) 260.Returns(ResiliencePipeline<HttpResponseMessage>.Empty) 289private void ConfigureBuilder(ResiliencePipelineBuilder<HttpResponseMessage> builder) => builder.AddTimeout(TimeSpan.FromSeconds(1));
Resilience\HttpClientBuilderExtensionsTests.Standard.cs (4)
39private static Task<HttpResponseMessage> SendRequest(HttpClient client, string url, bool asynchronous) 165var descriptor = provider.GetPipeline<HttpResponseMessage>(new HttpKey("test-standard", string.Empty)).GetPipelineDescriptor(); 295private static ResiliencePipeline<HttpResponseMessage> GetPipeline(IServiceCollection services, string name) 299return provider.GetPipeline<HttpResponseMessage>(new HttpKey(name, string.Empty));
Resilience\HttpResilienceMetricsEnricherTests.cs (4)
34var context = new EnrichmentContext<HttpResponseMessage, string>(default, tags); 46using var response = new HttpResponseMessage(System.Net.HttpStatusCode.InternalServerError); 47var args = new TelemetryEventArguments<HttpResponseMessage, string>(default!, default!, default!, default!, Outcome.FromResult(response)); 48var context = new EnrichmentContext<HttpResponseMessage, string>(args, tags);
Resilience\ResilienceHandlerTest.cs (8)
28using var handler = new ResilienceHandler(ResiliencePipeline<HttpResponseMessage>.Empty); 66using var handler = new ResilienceHandler(_ => ResiliencePipeline<HttpResponseMessage>.Empty); 98using var handler = new ResilienceHandler(_ => ResiliencePipeline<HttpResponseMessage>.Empty); 115var response = await InvokeHandler(invoker, request, asynchronous); 129using var handler = new ResilienceHandler(_ => ResiliencePipeline<HttpResponseMessage>.Empty); 140var response = await InvokeHandler(invoker, request, asynchronous, source.Token); 153using var handler = new ResilienceHandler(_ => ResiliencePipeline<HttpResponseMessage>.Empty); 162private static Task<HttpResponseMessage> InvokeHandler(
Microsoft.Extensions.Logging.AzureAppServices (2)
BlobAppendReferenceWrapper.cs (2)
33Task<HttpResponseMessage> AppendDataAsync() 44var response = await AppendDataAsync().ConfigureAwait(false);
Microsoft.Extensions.ML (2)
ModelLoaders\UriModelLoader.cs (2)
110var resp = await client.SendAsync(headRequest); 143var resp = await client.GetAsync(_uri);
Microsoft.Extensions.ServiceDiscovery (2)
Http\ResolvingHttpClientHandler.cs (1)
17protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Http\ResolvingHttpDelegatingHandler.cs (1)
41protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Microsoft.ML.AutoML.Tests (1)
DatasetUtil.cs (1)
210var response = await client.GetAsync(url).ConfigureAwait(false);
Microsoft.ML.Core (1)
Utilities\ResourceManagerUtils.cs (1)
268var response = await httpClient.GetAsync(uri, ct).ConfigureAwait(false);
Microsoft.ML.PerformanceTests (3)
ImageClassificationBench.cs (3)
163var headerResponse = client.GetAsync(url, HttpCompletionOption.ResponseHeadersRead).Result; 171var response = client.GetAsync(url).Result; 180var response = client.GetAsync(url).Result;
Microsoft.ML.Tokenizers (1)
Utils\Helpers.netstandard.cs (1)
25HttpResponseMessage response = await client.GetAsync(url, HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
Microsoft.ML.Tokenizers.Data.Tests (1)
test\Microsoft.ML.Tokenizers.Tests\Utils.cs (1)
21var response = await client.GetAsync(url);
Microsoft.ML.Tokenizers.Tests (1)
Utils.cs (1)
21var response = await client.GetAsync(url);
Negotiate.Client (8)
Controllers\AuthTestController.cs (8)
34var result = await client.GetAsync("auth/Unrestricted"); 55var result = await client.GetAsync("auth/Authorized"); 83var result = await client.GetAsync("auth/Authorized"); 106var result = await client.GetAsync("auth/Authorized"); 139var result = await client.GetAsync("auth/Authorized"); 172var result = await client.GetAsync("auth/Authorized"); 203var result = await client.GetAsync("auth/Unauthorized"); 229var result = await client.GetAsync("auth/Authorized");
netstandard (1)
netstandard.cs (1)
1132[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.Http.HttpResponseMessage))]
OpenIdConnectSample (1)
Startup.cs (1)
261var tokenResponse = await options.Backchannel.PostAsync(metadata.TokenEndpoint, content, context.RequestAborted);
ServerComparison.FunctionalTests (15)
HelloWorldTest.cs (2)
64var response = await RetryHelper.RetryRequest(() => 150using (var response = await RetryHelper.RetryRequest(() =>
NtlmAuthenticationTest.cs (1)
51var response = await RetryHelper.RetryRequest(() =>
ResponseCompressionTests.cs (4)
142var response = await RetryHelper.RetryRequest(() => 169var response = await client.SendAsync(request); 201var response = await client.SendAsync(request); 218private static string GetContentLength(HttpResponseMessage response)
ResponseTests.cs (8)
104var response = await RetryHelper.RetryRequest(() => 134var response = await client.SendAsync(requestMessage); 154var response = await client.GetAsync("connectionclose"); 179var response = await client.SendAsync(requestMessage); 204var response = await client.SendAsync(requestMessage); 229var response = await client.SendAsync(requestMessage); 249var response = await client.GetAsync("manuallychunkedandclose"); 266private static string GetContentLength(HttpResponseMessage response)
SocialSample (3)
Startup.cs (3)
141var response = await context.Backchannel.SendAsync(request, context.HttpContext.RequestAborted); 202var response = await context.Backchannel.SendAsync(request, context.HttpContext.RequestAborted); 330var refreshResponse = await options.Backchannel.PostAsync(options.TokenEndpoint, content, context.RequestAborted);
Sockets.FunctionalTests (5)
SocketTransportTests.cs (1)
55var response = await client.GetAsync($"http://127.0.0.1:{host.GetPort()}/");
src\Servers\Kestrel\test\FunctionalTests\RequestTests.cs (2)
187var response = await client.GetAsync($"http://127.0.0.1:{host.GetPort()}/"); 1123var response = await client.GetAsync($"http://{requestAddress}:{host.GetPort()}/");
src\Servers\Kestrel\test\FunctionalTests\ResponseTests.cs (2)
78var response = await client.GetAsync($"http://127.0.0.1:{host.GetPort()}/"); 127var response = await client.GetAsync($"http://127.0.0.1:{host.GetPort()}/");
Stress.ApiService (1)
Program.cs (1)
91var response = await client.GetAsync(url);
Stress.AppHost (1)
ResourceBuilderExtensions.cs (1)
66var response = await httpClient.SendAsync(request, context.CancellationToken);
System.Net.Http (161)
System\Net\Http\DelegatingHandler.cs (2)
45protected internal override HttpResponseMessage Send(HttpRequestMessage request, CancellationToken cancellationToken) 53protected internal override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
System\Net\Http\DiagnosticsHandler.cs (11)
76internal override ValueTask<HttpResponseMessage> SendAsync(HttpRequestMessage request, bool async, CancellationToken cancellationToken) 85new ValueTask<HttpResponseMessage>(_innerHandler.SendAsync(request, cancellationToken)) : 86new ValueTask<HttpResponseMessage>(_innerHandler.Send(request, cancellationToken)); 90private async ValueTask<HttpResponseMessage> SendAsyncCore(HttpRequestMessage request, bool async, CancellationToken cancellationToken) 160HttpResponseMessage? response = null; 271internal ActivityStopData(HttpResponseMessage? response, HttpRequestMessage request, TaskStatus requestTaskStatus) 278public HttpResponseMessage? Response { get; } 329[DynamicDependency(nameof(HttpResponseMessage.StatusCode), typeof(HttpResponseMessage))] 330internal ResponseData(HttpResponseMessage? response, Guid loggingRequestId, long timestamp, TaskStatus requestTaskStatus) 338public HttpResponseMessage? Response { get; }
System\Net\Http\DiagnosticsHelper.cs (1)
62public static bool TryGetErrorType(HttpResponseMessage? response, Exception? exception, out string? errorType)
System\Net\Http\HttpClient.cs (41)
184HttpResponseMessage? response = null; 259HttpResponseMessage? response = null; 337HttpResponseMessage? response = null; 363public Task<HttpResponseMessage> GetAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri) => 366public Task<HttpResponseMessage> GetAsync(Uri? requestUri) => 369public Task<HttpResponseMessage> GetAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, HttpCompletionOption completionOption) => 372public Task<HttpResponseMessage> GetAsync(Uri? requestUri, HttpCompletionOption completionOption) => 375public Task<HttpResponseMessage> GetAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, CancellationToken cancellationToken) => 378public Task<HttpResponseMessage> GetAsync(Uri? requestUri, CancellationToken cancellationToken) => 381public Task<HttpResponseMessage> GetAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, HttpCompletionOption completionOption, CancellationToken cancellationToken) => 384public Task<HttpResponseMessage> GetAsync(Uri? requestUri, HttpCompletionOption completionOption, CancellationToken cancellationToken) => 387public Task<HttpResponseMessage> PostAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, HttpContent? content) => 390public Task<HttpResponseMessage> PostAsync(Uri? requestUri, HttpContent? content) => 393public Task<HttpResponseMessage> PostAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, HttpContent? content, CancellationToken cancellationToken) => 396public Task<HttpResponseMessage> PostAsync(Uri? requestUri, HttpContent? content, CancellationToken cancellationToken) 403public Task<HttpResponseMessage> PutAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, HttpContent? content) => 406public Task<HttpResponseMessage> PutAsync(Uri? requestUri, HttpContent? content) => 409public Task<HttpResponseMessage> PutAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, HttpContent? content, CancellationToken cancellationToken) => 412public Task<HttpResponseMessage> PutAsync(Uri? requestUri, HttpContent? content, CancellationToken cancellationToken) 419public Task<HttpResponseMessage> PatchAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, HttpContent? content) => 422public Task<HttpResponseMessage> PatchAsync(Uri? requestUri, HttpContent? content) => 425public Task<HttpResponseMessage> PatchAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, HttpContent? content, CancellationToken cancellationToken) => 428public Task<HttpResponseMessage> PatchAsync(Uri? requestUri, HttpContent? content, CancellationToken cancellationToken) 435public Task<HttpResponseMessage> DeleteAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri) => 438public Task<HttpResponseMessage> DeleteAsync(Uri? requestUri) => 441public Task<HttpResponseMessage> DeleteAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, CancellationToken cancellationToken) => 444public Task<HttpResponseMessage> DeleteAsync(Uri? requestUri, CancellationToken cancellationToken) => 452public HttpResponseMessage Send(HttpRequestMessage request) => 456public HttpResponseMessage Send(HttpRequestMessage request, HttpCompletionOption completionOption) => 460public override HttpResponseMessage Send(HttpRequestMessage request, CancellationToken cancellationToken) => 464public HttpResponseMessage Send(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken) 471HttpResponseMessage? response = null; 503public Task<HttpResponseMessage> SendAsync(HttpRequestMessage request) => 506public override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) => 509public Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption) => 512public Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken) 520async Task<HttpResponseMessage> Core( 526HttpResponseMessage? response = null; 572private static void ThrowForNullResponse([NotNull] HttpResponseMessage? response) 584private void HandleFailure(Exception e, bool telemetryStarted, HttpResponseMessage? response, CancellationTokenSource cts, CancellationToken cancellationToken, CancellationTokenSource pendingRequestsCts) 645private static void FinishSend(HttpResponseMessage? response, CancellationTokenSource cts, bool disposeCts, bool telemetryStarted, bool responseContentTelemetryStarted)
System\Net\Http\HttpClientHandler.cs (2)
354protected internal override HttpResponseMessage Send(HttpRequestMessage request, CancellationToken cancellationToken) 364protected internal override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
System\Net\Http\HttpMessageHandler.cs (2)
22protected internal virtual HttpResponseMessage Send(HttpRequestMessage request, CancellationToken cancellationToken) 27protected internal abstract Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken);
System\Net\Http\HttpMessageInvoker.cs (5)
32public virtual HttpResponseMessage Send(HttpRequestMessage request, CancellationToken cancellationToken) 42HttpResponseMessage? response = null; 64public virtual Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 77static async Task<HttpResponseMessage> SendAsyncWithTelemetry(HttpMessageHandler handler, HttpRequestMessage request, CancellationToken cancellationToken) 81HttpResponseMessage? response = null;
System\Net\Http\HttpResponseMessage.cs (1)
161public HttpResponseMessage EnsureSuccessStatusCode()
System\Net\Http\HttpTelemetry.cs (1)
68public void RequestStop(HttpResponseMessage? response)
System\Net\Http\MessageProcessingHandler.cs (10)
27protected abstract HttpResponseMessage ProcessResponse(HttpResponseMessage response, 30protected internal sealed override HttpResponseMessage Send(HttpRequestMessage request, 37HttpResponseMessage response = base.Send(newRequestMessage, cancellationToken); 38HttpResponseMessage newResponseMessage = ProcessResponse(response, cancellationToken); 42protected internal sealed override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, 56Task<HttpResponseMessage> sendAsyncTask = base.SendAsync(newRequestMessage, cancellationToken); 86HttpResponseMessage responseMessage = self.ProcessResponse(task.Result, token); 118TaskCompletionSource<HttpResponseMessage> tcs, OperationCanceledException e) 136private sealed class SendState : TaskCompletionSource<HttpResponseMessage>
System\Net\Http\Metrics\HttpMetricsEnrichmentContext.cs (3)
33private HttpResponseMessage? _response; 53public HttpResponseMessage? Response => _response; 112HttpResponseMessage? response,
System\Net\Http\Metrics\MetricsHandler.cs (6)
36internal override ValueTask<HttpResponseMessage> SendAsync(HttpRequestMessage request, bool async, CancellationToken cancellationToken) 45new ValueTask<HttpResponseMessage>(_innerHandler.SendAsync(request, cancellationToken)) : 46new ValueTask<HttpResponseMessage>(_innerHandler.Send(request, cancellationToken)); 50private async ValueTask<HttpResponseMessage> SendAsyncWithMetrics(HttpRequestMessage request, bool async, CancellationToken cancellationToken) 53HttpResponseMessage? response = null; 97private void RequestStop(HttpRequestMessage request, HttpResponseMessage? response, Exception? exception, long startTimestamp, bool recordCurrentRequests)
System\Net\Http\SocketsHttpHandler\AuthenticationHelper.cs (10)
61internal static bool IsSessionAuthenticationChallenge(HttpResponseMessage response) 110private static bool TryGetAuthenticationChallenge(HttpResponseMessage response, bool isProxyAuth, Uri authUri, ICredentials credentials, out AuthenticationChallenge challenge) 131private static bool TryGetRepeatedChallenge(HttpResponseMessage response, string scheme, bool isProxyAuth, out string? challengeData) 150private static bool IsAuthenticationChallenge(HttpResponseMessage response, bool isProxyAuth) 157private static HttpHeaderValueCollection<AuthenticationHeaderValue> GetResponseAuthenticationHeaderValues(HttpResponseMessage response, bool isProxyAuth) 206private static ValueTask<HttpResponseMessage> InnerSendAsync(HttpRequestMessage request, bool async, bool isProxyAuth, bool doRequestAuth, HttpConnectionPool pool, CancellationToken cancellationToken) 213private static async ValueTask<HttpResponseMessage> SendWithAuthAsync(HttpRequestMessage request, Uri authUri, bool async, ICredentials credentials, bool preAuthenticate, bool isProxyAuth, bool doRequestAuth, HttpConnectionPool pool, CancellationToken cancellationToken) 241HttpResponseMessage response = await InnerSendAsync(request, async, isProxyAuth, doRequestAuth, pool, cancellationToken).ConfigureAwait(false); 348public static ValueTask<HttpResponseMessage> SendWithProxyAuthAsync(HttpRequestMessage request, Uri proxyUri, bool async, ICredentials proxyCredentials, bool doRequestAuth, HttpConnectionPool pool, CancellationToken cancellationToken) 353public static ValueTask<HttpResponseMessage> SendWithRequestAuthAsync(HttpRequestMessage request, bool async, ICredentials credentials, bool preAuthenticate, HttpConnectionPool pool, CancellationToken cancellationToken)
System\Net\Http\SocketsHttpHandler\AuthenticationHelper.NtAuth.cs (6)
51private static Task<HttpResponseMessage> InnerSendAsync(HttpRequestMessage request, bool async, bool isProxyAuth, HttpConnectionPool pool, HttpConnection connection, CancellationToken cancellationToken) 58private static bool ProxySupportsConnectionAuth(HttpResponseMessage response) 76private static async Task<HttpResponseMessage> SendWithNtAuthAsync(HttpRequestMessage request, Uri authUri, bool async, ICredentials credentials, TokenImpersonationLevel impersonationLevel, bool isProxyAuth, HttpConnection connection, HttpConnectionPool connectionPool, CancellationToken cancellationToken) 78HttpResponseMessage response = await InnerSendAsync(request, async, isProxyAuth, connectionPool, connection, cancellationToken).ConfigureAwait(false); 235public static Task<HttpResponseMessage> SendWithNtProxyAuthAsync(HttpRequestMessage request, Uri proxyUri, bool async, ICredentials proxyCredentials, TokenImpersonationLevel impersonationLevel, HttpConnection connection, HttpConnectionPool connectionPool, CancellationToken cancellationToken) 240public static Task<HttpResponseMessage> SendWithNtConnectionAuthAsync(HttpRequestMessage request, bool async, ICredentials credentials, TokenImpersonationLevel impersonationLevel, HttpConnection connection, HttpConnectionPool connectionPool, CancellationToken cancellationToken)
System\Net\Http\SocketsHttpHandler\ChunkedEncodingReadStream.cs (2)
21private readonly HttpResponseMessage _response; 23public ChunkedEncodingReadStream(HttpConnection connection, HttpResponseMessage response) : base(connection)
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.cs (7)
354public ValueTask<HttpResponseMessage> SendAsync(HttpRequestMessage request, bool async, bool doRequestAuth, CancellationToken cancellationToken) 373public ValueTask<HttpResponseMessage> SendWithProxyAuthAsync(HttpRequestMessage request, bool async, bool doRequestAuth, CancellationToken cancellationToken) 383private Task<HttpResponseMessage> SendWithNtConnectionAuthAsync(HttpConnection connection, HttpRequestMessage request, bool async, bool doRequestAuth, CancellationToken cancellationToken) 393public Task<HttpResponseMessage> SendWithNtProxyAuthAsync(HttpConnection connection, HttpRequestMessage request, bool async, CancellationToken cancellationToken) 403public async ValueTask<HttpResponseMessage> SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, bool async, bool doRequestAuth, CancellationToken cancellationToken) 415HttpResponseMessage? response = null; 792HttpResponseMessage tunnelResponse = await _poolManager.SendProxyConnectAsync(tunnelRequest, _proxyUri!, async, cancellationToken).ConfigureAwait(false);
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http3.cs (3)
68private async ValueTask<HttpResponseMessage?> TrySendUsingHttp3Async(HttpRequestMessage request, CancellationToken cancellationToken) 111HttpResponseMessage response = await connection.SendAsync(request, queueStartingTimestamp, waitForConnectionActivity, cancellationToken).ConfigureAwait(false); 635private void ProcessAltSvc(HttpResponseMessage response)
System\Net\Http\SocketsHttpHandler\CookieHelper.cs (1)
12public static void ProcessReceivedCookies(HttpResponseMessage response, CookieContainer cookieContainer)
System\Net\Http\SocketsHttpHandler\DecompressionHandler.cs (2)
52internal override async ValueTask<HttpResponseMessage> SendAsync(HttpRequestMessage request, bool async, CancellationToken cancellationToken) 69HttpResponseMessage response = await _innerHandler.SendAsync(request, async, cancellationToken).ConfigureAwait(false);
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (1)
1983public async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, bool async, CancellationToken cancellationToken)
System\Net\Http\SocketsHttpHandler\Http2Stream.cs (9)
35private HttpResponseMessage? _response; 164public HttpResponseMessage GetAndClearResponse() 171HttpResponseMessage r = _response; 1137public int ReadData(Span<byte> buffer, HttpResponseMessage responseMessage) 1162public async ValueTask<int> ReadDataAsync(Memory<byte> buffer, HttpResponseMessage responseMessage, CancellationToken cancellationToken) 1186public void CopyTo(HttpResponseMessage responseMessage, Stream destination, int bufferSize) 1222public async Task CopyToAsync(HttpResponseMessage responseMessage, Stream destination, int bufferSize, CancellationToken cancellationToken) 1258private void MoveTrailersToResponseMessage(HttpResponseMessage responseMessage) 1547private readonly HttpResponseMessage _responseMessage;
System\Net\Http\SocketsHttpHandler\Http3Connection.cs (2)
244public async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, long queueStartingTimestamp, Activity? waitForConnectionActivity, CancellationToken cancellationToken) 318Task<HttpResponseMessage> responseTask = requestStream.SendAsync(cancellationToken);
System\Net\Http\SocketsHttpHandler\Http3RequestStream.cs (8)
36private HttpResponseMessage? _response; 142public async Task<HttpResponseMessage> SendAsync(CancellationToken cancellationToken) 261HttpResponseMessage response = _response; 590private void CopyTrailersToResponseMessage(HttpResponseMessage responseMessage) 1137private int ReadResponseContent(HttpResponseMessage response, Span<byte> buffer) 1210private async ValueTask<int> ReadResponseContentAsync(HttpResponseMessage response, Memory<byte> buffer, CancellationToken cancellationToken) 1330private async ValueTask<bool> ReadNextDataFrameAsync(HttpResponseMessage response, CancellationToken cancellationToken) 1397private HttpResponseMessage? _response;
System\Net\Http\SocketsHttpHandler\HttpAuthenticatedConnectionHandler.cs (1)
18internal override ValueTask<HttpResponseMessage> SendAsync(HttpRequestMessage request, bool async, CancellationToken cancellationToken)
System\Net\Http\SocketsHttpHandler\HttpConnection.cs (8)
532public async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, bool async, CancellationToken cancellationToken) 663var response = new HttpResponseMessage() { RequestMessage = request, Content = new HttpConnectionResponseContent() }; 1027private bool ParseStatusLine(HttpResponseMessage response) 1056private static void ParseStatusLineCore(Span<byte> line, HttpResponseMessage response) 1129private bool ParseHeaders(HttpResponseMessage? response, bool isFromTrailer) 1148private (bool finished, int bytesConsumed) ParseHeadersCore(Span<byte> buffer, HttpResponseMessage? response, bool isFromTrailer) 1227private void AddResponseHeader(ReadOnlySpan<byte> name, ReadOnlySpan<byte> value, HttpResponseMessage response, bool isFromTrailer) 2067public async ValueTask DrainResponseAsync(HttpResponseMessage response, CancellationToken cancellationToken)
System\Net\Http\SocketsHttpHandler\HttpConnectionHandler.cs (1)
18internal override ValueTask<HttpResponseMessage> SendAsync(HttpRequestMessage request, bool async, CancellationToken cancellationToken)
System\Net\Http\SocketsHttpHandler\HttpConnectionPoolManager.cs (4)
330public ValueTask<HttpResponseMessage> SendAsyncCore(HttpRequestMessage request, Uri? proxyUri, bool async, bool doRequestAuth, bool isProxyConnect, CancellationToken cancellationToken) 369public ValueTask<HttpResponseMessage> SendProxyConnectAsync(HttpRequestMessage request, Uri proxyUri, bool async, CancellationToken cancellationToken) 374public ValueTask<HttpResponseMessage> SendAsync(HttpRequestMessage request, bool async, bool doRequestAuth, CancellationToken cancellationToken) 427private async ValueTask<HttpResponseMessage> SendAsyncMultiProxy(HttpRequestMessage request, bool async, bool doRequestAuth, MultiProxy multiProxy, Uri? firstProxy, CancellationToken cancellationToken)
System\Net\Http\SocketsHttpHandler\HttpMessageHandlerStage.cs (4)
11protected internal sealed override HttpResponseMessage Send(HttpRequestMessage request, 14ValueTask<HttpResponseMessage> sendTask = SendAsync(request, async: false, cancellationToken); 20protected internal sealed override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) => 23internal abstract ValueTask<HttpResponseMessage> SendAsync(HttpRequestMessage request, bool async, CancellationToken cancellationToken);
System\Net\Http\SocketsHttpHandler\RedirectHandler.cs (3)
28internal override async ValueTask<HttpResponseMessage> SendAsync(HttpRequestMessage request, bool async, CancellationToken cancellationToken) 30HttpResponseMessage response = await _initialInnerHandler.SendAsync(request, async, cancellationToken).ConfigureAwait(false); 91private Uri? GetUriForRedirect(Uri requestUri, HttpResponseMessage response)
System\Net\Http\SocketsHttpHandler\SocketsHttpHandler.cs (4)
578protected internal override HttpResponseMessage Send(HttpRequestMessage request, 609protected internal override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 617return Task.FromCanceled<HttpResponseMessage>(cancellationToken); 625return Task.FromException<HttpResponseMessage>(error);
System.Net.Http.Json (30)
System\Net\Http\Json\HttpClientJsonExtensions.cs (9)
19private static Task<object?> FromJsonAsyncCore(Func<HttpClient, Uri?, CancellationToken, Task<HttpResponseMessage>> getMethod, HttpClient client, Uri? requestUri, Type type, JsonSerializerOptions? options, CancellationToken cancellationToken = default) => 24private static Task<TValue?> FromJsonAsyncCore<TValue>(Func<HttpClient, Uri?, CancellationToken, Task<HttpResponseMessage>> getMethod, HttpClient client, Uri? requestUri, JsonSerializerOptions? options, CancellationToken cancellationToken = default) => 27private static Task<object?> FromJsonAsyncCore(Func<HttpClient, Uri?, CancellationToken, Task<HttpResponseMessage>> getMethod, HttpClient client, Uri? requestUri, Type type, JsonSerializerContext context, CancellationToken cancellationToken = default) => 30private static Task<TValue?> FromJsonAsyncCore<TValue>(Func<HttpClient, Uri?, CancellationToken, Task<HttpResponseMessage>> getMethod, HttpClient client, Uri? requestUri, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken) => 34Func<HttpClient, Uri?, CancellationToken, Task<HttpResponseMessage>> getMethod, 57Task<HttpResponseMessage> responseTask; 75Task<HttpResponseMessage> responseTask, 84using HttpResponseMessage response = await responseTask.ConfigureAwait(false); 117HttpResponseMessage response,
System\Net\Http\Json\HttpClientJsonExtensions.Delete.cs (1)
18private static readonly Func<HttpClient, Uri?, CancellationToken, Task<HttpResponseMessage>> s_deleteAsync =
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 (1)
18private static readonly Func<HttpClient, Uri?, CancellationToken, Task<HttpResponseMessage>> s_getAsync =
System\Net\Http\Json\HttpClientJsonExtensions.Patch.cs (6)
27public static Task<HttpResponseMessage> PatchAsJsonAsync<TValue>(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, TValue value, JsonSerializerOptions? options = null, CancellationToken cancellationToken = default) 51public static Task<HttpResponseMessage> PatchAsJsonAsync<TValue>(this HttpClient client, Uri? requestUri, TValue value, JsonSerializerOptions? options = null, CancellationToken cancellationToken = default) 74public static Task<HttpResponseMessage> PatchAsJsonAsync<TValue>(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, TValue value, CancellationToken cancellationToken) 89public static Task<HttpResponseMessage> PatchAsJsonAsync<TValue>(this HttpClient client, Uri? requestUri, TValue value, CancellationToken cancellationToken) 103public static Task<HttpResponseMessage> PatchAsJsonAsync<TValue>(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, TValue value, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default) 125public static Task<HttpResponseMessage> PatchAsJsonAsync<TValue>(this HttpClient client, Uri? requestUri, TValue value, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default)
System\Net\Http\Json\HttpClientJsonExtensions.Post.cs (6)
16public static Task<HttpResponseMessage> PostAsJsonAsync<TValue>(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, TValue value, JsonSerializerOptions? options = null, CancellationToken cancellationToken = default) 29public static Task<HttpResponseMessage> PostAsJsonAsync<TValue>(this HttpClient client, Uri? requestUri, TValue value, JsonSerializerOptions? options = null, CancellationToken cancellationToken = default) 42public static Task<HttpResponseMessage> PostAsJsonAsync<TValue>(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, TValue value, CancellationToken cancellationToken) 47public static Task<HttpResponseMessage> PostAsJsonAsync<TValue>(this HttpClient client, Uri? requestUri, TValue value, CancellationToken cancellationToken) 50public static Task<HttpResponseMessage> PostAsJsonAsync<TValue>(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, TValue value, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default) 61public static Task<HttpResponseMessage> PostAsJsonAsync<TValue>(this HttpClient client, Uri? requestUri, TValue value, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default)
System\Net\Http\Json\HttpClientJsonExtensions.Put.cs (6)
16public static Task<HttpResponseMessage> PutAsJsonAsync<TValue>(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, TValue value, JsonSerializerOptions? options = null, CancellationToken cancellationToken = default) 29public static Task<HttpResponseMessage> PutAsJsonAsync<TValue>(this HttpClient client, Uri? requestUri, TValue value, JsonSerializerOptions? options = null, CancellationToken cancellationToken = default) 42public static Task<HttpResponseMessage> PutAsJsonAsync<TValue>(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, TValue value, CancellationToken cancellationToken) 47public static Task<HttpResponseMessage> PutAsJsonAsync<TValue>(this HttpClient client, Uri? requestUri, TValue value, CancellationToken cancellationToken) 50public static Task<HttpResponseMessage> PutAsJsonAsync<TValue>(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, TValue value, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default) 61public static Task<HttpResponseMessage> PutAsJsonAsync<TValue>(this HttpClient client, Uri? requestUri, TValue value, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default)
System.Net.Http.WinHttpHandler (1)
artifacts\obj\System.Net.Http.WinHttpHandler\Debug\net10.0\System.Net.Http.WinHttpHandler.notsupported.cs (1)
52protected override System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> SendAsync(System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_WinHttpHandler); }
System.Net.Requests (6)
System\Net\HttpWebRequest.cs (3)
48private Task<HttpResponseMessage>? _sendRequestTask; 1168private Task<HttpResponseMessage> SendRequest(bool async, HttpContent? content = null) 1255HttpResponseMessage responseMessage = await _sendRequestTask.ConfigureAwait(false);
System\Net\HttpWebResponse.cs (3)
24private HttpResponseMessage _httpResponseMessage = null!; 58internal HttpWebResponse(HttpResponseMessage _message, Uri requestUri, CookieContainer? cookieContainer) 369var httpResponseMessage = _httpResponseMessage;
System.Net.WebSockets.Client (3)
System\Net\WebSockets\WebSocketHandle.Managed.cs (3)
67HttpResponseMessage? response = null; 127Task<HttpResponseMessage> sendTask = invoker is HttpClient client 447private static void ValidateResponse(HttpResponseMessage response, string? secValue)
Templates.Blazor.Tests (6)
BlazorWebTemplateTest.cs (1)
83var response = await aspNetProcess.SendRequest(() =>
src\ProjectTemplates\Shared\AspNetProcess.cs (5)
174var result = await RetryHelper.RetryRequest(async () => 236private static bool IsSuccessStatusCode(HttpResponseMessage response) 247internal Task<HttpResponseMessage> SendRequest(string path) => 250internal Task<HttpResponseMessage> SendRequest(Func<HttpRequestMessage> requestFactory) 255var response = await RetryHelper.RetryRequest(() =>
Templates.Blazor.WebAssembly.Auth.Tests (6)
src\ProjectTemplates\Shared\AspNetProcess.cs (5)
174var result = await RetryHelper.RetryRequest(async () => 236private static bool IsSuccessStatusCode(HttpResponseMessage response) 247internal Task<HttpResponseMessage> SendRequest(string path) => 250internal Task<HttpResponseMessage> SendRequest(Func<HttpRequestMessage> requestFactory) 255var response = await RetryHelper.RetryRequest(() =>
src\Shared\E2ETesting\SauceConnectServer.cs (1)
159var response = await httpClient.GetAsync(uri);
Templates.Blazor.WebAssembly.Tests (6)
src\ProjectTemplates\Shared\AspNetProcess.cs (5)
174var result = await RetryHelper.RetryRequest(async () => 236private static bool IsSuccessStatusCode(HttpResponseMessage response) 247internal Task<HttpResponseMessage> SendRequest(string path) => 250internal Task<HttpResponseMessage> SendRequest(Func<HttpRequestMessage> requestFactory) 255var response = await RetryHelper.RetryRequest(() =>
src\Shared\E2ETesting\SauceConnectServer.cs (1)
159var response = await httpClient.GetAsync(uri);
Templates.Mvc.Tests (7)
BlazorTemplateTest.cs (1)
110var response = await process.SendRequest(BlazorTemplatePages.Auth);
src\ProjectTemplates\Shared\AspNetProcess.cs (5)
174var result = await RetryHelper.RetryRequest(async () => 236private static bool IsSuccessStatusCode(HttpResponseMessage response) 247internal Task<HttpResponseMessage> SendRequest(string path) => 250internal Task<HttpResponseMessage> SendRequest(Func<HttpRequestMessage> requestFactory) 255var response = await RetryHelper.RetryRequest(() =>
src\Shared\E2ETesting\SauceConnectServer.cs (1)
159var response = await httpClient.GetAsync(uri);
Templates.Tests (9)
IdentityUIPackageTest.cs (3)
131var response = await aspNetProcess.SendRequest("/Identity/lib/bootstrap/dist/css/bootstrap.css"); 143var response = await aspNetProcess.SendRequest("/Identity/lib/bootstrap/dist/css/bootstrap.css"); 154var response = await aspNetProcess.SendRequest(file);
src\ProjectTemplates\Shared\AspNetProcess.cs (5)
174var result = await RetryHelper.RetryRequest(async () => 236private static bool IsSuccessStatusCode(HttpResponseMessage response) 247internal Task<HttpResponseMessage> SendRequest(string path) => 250internal Task<HttpResponseMessage> SendRequest(Func<HttpRequestMessage> requestFactory) 255var response = await RetryHelper.RetryRequest(() =>
src\Shared\E2ETesting\SauceConnectServer.cs (1)
159var response = await httpClient.GetAsync(uri);