942 instantiations of HttpRequestMessage
Aspire.Dashboard.Tests (12)
Integration\OtlpCorsHttpServiceTests.cs (5)
30var preflightRequest = new HttpRequestMessage(HttpMethod.Options, "/v1/logs"); 55var preflightRequest1 = new HttpRequestMessage(HttpMethod.Options, "/v1/logs"); 69var preflightRequest2 = new HttpRequestMessage(HttpMethod.Options, "/v1/logs"); 95var preflightRequest = new HttpRequestMessage(HttpMethod.Options, "/v1/logs"); 123var preflightRequest = new HttpRequestMessage(HttpMethod.Options, "/v1/logs");
Integration\OtlpHttpServiceTests.cs (3)
140var requestMessage = new HttpRequestMessage(HttpMethod.Post, "/v1/logs"); 168var requestMessage = new HttpRequestMessage(HttpMethod.Post, "/v1/logs"); 260var requestMessage = new HttpRequestMessage(new HttpMethod(method), "/v1/logs");
Integration\ResponseCompressionTests.cs (2)
26var request = new HttpRequestMessage(HttpMethod.Get, DashboardUrls.StructuredLogsBasePath); 48var request = new HttpRequestMessage(HttpMethod.Get, path);
Integration\StartupTests.cs (2)
298var request = new HttpRequestMessage(HttpMethod.Get, "/"); 399var request = new HttpRequestMessage(HttpMethod.Get, "/");
Aspire.Hosting.Redis (1)
RedisBuilderExtensions.cs (1)
282var deleteRequest = new HttpRequestMessage(HttpMethod.Delete, databasesPath)
AuthSamples.FunctionalTests (1)
HttpClientExtensions.cs (1)
47var submision = new HttpRequestMessage(new HttpMethod(submit.Method.ToString()), target)
Diagnostics.FunctionalTests (13)
DatabaseErrorPageSampleTest.cs (1)
25var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/");
DeveloperExceptionPageSampleTest.cs (2)
26var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/"); 41var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/");
ExceptionHandlerSampleTest.cs (1)
22var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/throw");
MiddlewareAnalysisSampleTest.cs (1)
22var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/");
ProblemDetailsExceptionHandlerSampleTest.cs (2)
26var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/throw"); 43var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/throw2/conflict");
StatusCodeSampleTest.cs (5)
27var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/errors/417"); 43var request = new HttpRequestMessage(HttpMethod.Get, $"http://localhost/?statuscode={httpStatusCode}"); 60var request = new HttpRequestMessage(HttpMethod.Get, $"http://localhost/?statuscode={httpStatusCode}"); 81var request = new HttpRequestMessage(HttpMethod.Get, $"http://localhost?statuscode={httpStatusCode}"); 99var request = new HttpRequestMessage(HttpMethod.Get, $"http://localhost?statuscode={httpStatusCode}");
WelcomePageSampleTest.cs (1)
21var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/");
dotnet-svcutil-lib (2)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpChannelFactory.cs (2)
594var requestMessage = new HttpRequestMessage(HttpMethod.Post, httpRequestUri); 1235HttpRequestMessage headHttpRequestMessage = new HttpRequestMessage()
GenerateRulesMissingDocumentation (1)
Program.cs (1)
113var request = new HttpRequestMessage(HttpMethod.Head, uri);
HttpStress (11)
Program.cs (11)
122using (var req = new HttpRequestMessage(HttpMethod.Get, serverUri + path) { Version = httpVersion }) 174using (var req = new HttpRequestMessage(HttpMethod.Get, serverUri) { Version = httpVersion }) 203using (var req = new HttpRequestMessage(HttpMethod.Get, serverUri + "/headers") { Version = httpVersion }) 215using (var req = new HttpRequestMessage(HttpMethod.Get, serverUri) { Version = httpVersion }) 243using (var req = new HttpRequestMessage(HttpMethod.Post, serverUri) { Version = httpVersion, Content = new StringDuplexContent(content) }) 257using (var req = new HttpRequestMessage(HttpMethod.Post, serverUri + "/duplex") { Version = httpVersion, Content = new StringDuplexContent(content) }) 271using (var req = new HttpRequestMessage(HttpMethod.Post, serverUri + "/duplexSlow") { Version = httpVersion, Content = new ByteAtATimeNoLengthContent(Encoding.ASCII.GetBytes(content)) }) 285using (var req = new HttpRequestMessage(HttpMethod.Post, serverUri) { Version = httpVersion, Content = new StringContent(content) }) 302using (var req = new HttpRequestMessage(HttpMethod.Post, serverUri) { Version = httpVersion, Content = new StringContent(content) }) 325using (var req = new HttpRequestMessage(HttpMethod.Head, serverUri) { Version = httpVersion }) 347using (var req = new HttpRequestMessage(HttpMethod.Put, serverUri) { Version = httpVersion, Content = new StringContent(content) })
IIS.FunctionalTests (7)
Http3Tests.cs (1)
67var request = new HttpRequestMessage(HttpMethod.Get, address);
src\Servers\IIS\IIS\test\Common.FunctionalTests\BasicAuthTests.cs (1)
60var request = new HttpRequestMessage(HttpMethod.Get, "/Auth");
src\Servers\IIS\IIS\test\Common.FunctionalTests\Latin1Tests.cs (2)
48var requestMessage = new HttpRequestMessage(HttpMethod.Get, $"{deploymentResult.ApplicationBaseUri}Latin1"); 66var requestMessage = new HttpRequestMessage(HttpMethod.Get, $"{deploymentResult.ApplicationBaseUri}InvalidCharacter");
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestResponseTests.cs (3)
127var request = new HttpRequestMessage(HttpMethod.Get, "/CompressedData"); 145var request = new HttpRequestMessage(HttpMethod.Get, "/CompressedData"); 582var request = new HttpRequestMessage(new HttpMethod(method), _fixture.Client.BaseAddress + $"SetCustomErorCode?code={code}");
IISExpress.FunctionalTests (6)
src\Servers\IIS\IIS\test\Common.FunctionalTests\BasicAuthTests.cs (1)
60var request = new HttpRequestMessage(HttpMethod.Get, "/Auth");
src\Servers\IIS\IIS\test\Common.FunctionalTests\Latin1Tests.cs (2)
48var requestMessage = new HttpRequestMessage(HttpMethod.Get, $"{deploymentResult.ApplicationBaseUri}Latin1"); 66var requestMessage = new HttpRequestMessage(HttpMethod.Get, $"{deploymentResult.ApplicationBaseUri}InvalidCharacter");
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestResponseTests.cs (3)
127var request = new HttpRequestMessage(HttpMethod.Get, "/CompressedData"); 145var request = new HttpRequestMessage(HttpMethod.Get, "/CompressedData"); 582var request = new HttpRequestMessage(new HttpMethod(method), _fixture.Client.BaseAddress + $"SetCustomErorCode?code={code}");
InMemory.FunctionalTests (7)
EventSourceTests.cs (1)
188using var httpRequestMessage = new HttpRequestMessage()
Http2\Http2EndToEndTests.cs (1)
65using var httpRequestMessage = new HttpRequestMessage()
KestrelMetricsTests.cs (5)
567var httpRequestMessage = new HttpRequestMessage() 646var httpRequestMessage = new HttpRequestMessage() 724using var httpRequestMessage = new HttpRequestMessage() 805using var httpRequestMessage = new HttpRequestMessage() 893using var httpRequestMessage = new HttpRequestMessage()
Interop.FunctionalTests (49)
Http2\Http2RequestTests.cs (4)
126var request1 = new HttpRequestMessage(HttpMethod.Get, $"https://[::1]:{host.GetPort()}/"); 183var request1 = new HttpRequestMessage(HttpMethod.Get, $"http://127.0.0.1:{host.GetPort()}/"); 209var request = new HttpRequestMessage(HttpMethod.Get, $"http://127.0.0.1:{host.GetPort()}/"); 292var request = new HttpRequestMessage(HttpMethod.Get, $"http://127.0.0.1:{host.GetPort()}/");
Http3\Http3RequestTests.cs (37)
89var request1 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 148var request = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 250var request = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 293var request = new HttpRequestMessage(HttpMethod.Post, $"https://127.0.0.1:{host.GetPort()}/"); 374var request = new HttpRequestMessage(HttpMethod.Post, $"https://127.0.0.1:{host.GetPort()}/"); 417var request = new HttpRequestMessage(HttpMethod.Post, $"https://127.0.0.1:{host.GetPort()}/"); 488var request = new HttpRequestMessage(HttpMethod.Post, $"https://127.0.0.1:{host.GetPort()}/"); 559var request = new HttpRequestMessage(HttpMethod.Post, $"https://127.0.0.1:{host.GetPort()}/"); 619var request = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 675var request = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 724var request = new HttpRequestMessage(HttpMethod.Post, $"https://127.0.0.1:{host.GetPort()}/"); 815var request = new HttpRequestMessage(HttpMethod.Get, address); 851var request1 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 862var request2 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 911var request1 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 924var request2 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 940var request3 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 1013var request = new HttpRequestMessage(HttpMethod.Post, $"https://127.0.0.1:{host.GetPort()}/"); 1110var request = new HttpRequestMessage(HttpMethod.Post, $"https://127.0.0.1:{host.GetPort()}/"); 1257var request = new HttpRequestMessage(HttpMethod.Post, $"https://127.0.0.1:{host.GetPort()}/"); 1316var request = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 1369var request = new HttpRequestMessage(HttpMethod.Post, $"https://127.0.0.1:{host.GetPort()}/"); 1422var request1 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 1432var request2 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 1488var request1 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 1499var request2 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 1541var request1 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 1559var request2 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 1603var request1 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{port}/"); 1663var request1 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{port}/"); 1719var request1 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{port}/"); 1839var request = new HttpRequestMessage(method, url); 1885var request1 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{port}/"); 1962var request1 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{port}/"); 2038var request = new HttpRequestMessage(HttpMethod.Post, $"https://127.0.0.1:{host.GetPort()}/"); 2138var request = new HttpRequestMessage(HttpMethod.Post, $"https://127.0.0.1:{host.GetPort()}/"); 2192var request = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/");
Http3\Http3TlsTests.cs (7)
56var request = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 103var request = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 145var request = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 194var request = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 244var request = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 322var request = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 473var request = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/");
HttpClientHttp2InteropTests.cs (1)
1698return new HttpRequestMessage(method, url)
Microsoft.AspNetCore.Authentication.Google (1)
GoogleHandler.cs (1)
47var request = new HttpRequestMessage(HttpMethod.Get, Options.UserInformationEndpoint);
Microsoft.AspNetCore.Authentication.MicrosoftAccount (1)
MicrosoftAccountHandler.cs (1)
43var request = new HttpRequestMessage(HttpMethod.Get, Options.UserInformationEndpoint);
Microsoft.AspNetCore.Authentication.OAuth (1)
OAuthHandler.cs (1)
218var requestMessage = new HttpRequestMessage(HttpMethod.Post, Options.TokenEndpoint);
Microsoft.AspNetCore.Authentication.OpenIdConnect (3)
OpenIdConnectHandler.cs (3)
596var requestMessage = new HttpRequestMessage(HttpMethod.Post, parEndpoint); 991var requestMessage = new HttpRequestMessage(HttpMethod.Post, tokenEndpointRequest.TokenEndpoint ?? _configuration?.TokenEndpoint); 1057var requestMessage = new HttpRequestMessage(HttpMethod.Get, userInfoEndpoint);
Microsoft.AspNetCore.Authentication.Test (19)
CookieTests.cs (1)
1905var request = new HttpRequestMessage(HttpMethod.Get, uri);
JwtBearerTests.cs (2)
909var response = await server.CreateClient().SendAsync(new HttpRequestMessage(HttpMethod.Get, string.Empty)); 1250var request = new HttpRequestMessage(HttpMethod.Get, uri);
JwtBearerTests_Handler.cs (2)
854var response = await server.CreateClient().SendAsync(new HttpRequestMessage(HttpMethod.Get, string.Empty)); 1309var request = new HttpRequestMessage(HttpMethod.Get, uri);
OpenIdConnect\OpenIdConnectAuthenticateTests.cs (1)
58var request = new HttpRequestMessage(HttpMethod.Post, "/");
OpenIdConnect\TestServerExtensions.cs (1)
19return SendAsync(server, new HttpRequestMessage(HttpMethod.Get, url), cookieHeader);
TestExtensions.cs (1)
20var request = new HttpRequestMessage(HttpMethod.Get, uri);
TwitterTests.cs (3)
218var request = new HttpRequestMessage(HttpMethod.Get, "/signin-twitter?denied=ABCDEFG"); 268var request = new HttpRequestMessage(HttpMethod.Get, "/signin-twitter?denied=ABCDEFG"); 375var request = new HttpRequestMessage(HttpMethod.Get, "/signin-twitter?denied=ABCDEFG");
WsFederation\WsFederationTest.cs (4)
126var request = new HttpRequestMessage(HttpMethod.Post, queryItems["wreply"]); 133request = new HttpRequestMessage(HttpMethod.Get, response.Headers.Location); 160var request = new HttpRequestMessage(HttpMethod.Get, response.Headers.Location); 177var request = new HttpRequestMessage(HttpMethod.Post, queryItems["wreply"]);
WsFederation\WsFederationTest_Handler.cs (4)
124var request = new HttpRequestMessage(HttpMethod.Post, queryItems["wreply"]); 131request = new HttpRequestMessage(HttpMethod.Get, response.Headers.Location); 158var request = new HttpRequestMessage(HttpMethod.Get, response.Headers.Location); 175var request = new HttpRequestMessage(HttpMethod.Post, queryItems["wreply"]);
Microsoft.AspNetCore.Authentication.Twitter (1)
TwitterHandler.cs (1)
254var request = new HttpRequestMessage(httpMethod, url + queryString);
Microsoft.AspNetCore.CookiePolicy.Test (1)
TestExtensions.cs (1)
17var request = new HttpRequestMessage(HttpMethod.Get, uri);
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (2)
Logging\AcceptanceTests.cs (2)
292using var request = new HttpRequestMessage(HttpMethod.Post, "/") 356using var httpMessage = new HttpRequestMessage(HttpMethod.Get, "/");
Microsoft.AspNetCore.Diagnostics.Tests (4)
DeveloperExceptionPageMiddlewareTest.cs (3)
62var request = new HttpRequestMessage(HttpMethod.Get, "/path"); 115var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/test/1"); 174var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/test/1");
ExceptionHandlerMiddlewareTest.cs (1)
68var request = new HttpRequestMessage(HttpMethod.Get, "/path");
Microsoft.AspNetCore.HeaderPropagation.Tests (18)
HeaderPropagationIntegrationTest.cs (4)
61var request = new HttpRequestMessage(); 109var request = new HttpRequestMessage(); 135var request = new HttpRequestMessage(); 182var request = new HttpRequestMessage();
HeaderPropagationMessageHandlerTest.cs (14)
46await Client.SendAsync(new HttpRequestMessage()); 61await Client.SendAsync(new HttpRequestMessage()); 75await Client.SendAsync(new HttpRequestMessage() { Content = new StringContent("test") }); 89await Client.SendAsync(new HttpRequestMessage() { Content = new StringContent("test") }); 103await Client.SendAsync(new HttpRequestMessage() { Content = new StringContent("test") }); 118await Client.SendAsync(new HttpRequestMessage()); 132await Client.SendAsync(new HttpRequestMessage()); 145await Client.SendAsync(new HttpRequestMessage()); 161await Client.SendAsync(new HttpRequestMessage()); 180await Client.SendAsync(new HttpRequestMessage()); 197var request = new HttpRequestMessage(); 217await Client.SendAsync(new HttpRequestMessage()); 233await Client.SendAsync(new HttpRequestMessage()); 252await Client.SendAsync(new HttpRequestMessage());
Microsoft.AspNetCore.Http.Connections.Client (6)
HttpConnection.cs (1)
472using (var request = new HttpRequestMessage(HttpMethod.Post, uri))
Internal\LongPollingTransport.cs (3)
54var request = new HttpRequestMessage(HttpMethod.Get, url); 154var request = new HttpRequestMessage(HttpMethod.Get, pollUrl); 233var request = new HttpRequestMessage(HttpMethod.Delete, url);
Internal\SendUtils.cs (1)
43var request = new HttpRequestMessage(HttpMethod.Post, sendUrl);
Internal\ServerSentEventsTransport.cs (1)
55var request = new HttpRequestMessage(HttpMethod.Get, url);
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")); 1776var request = new HttpRequestMessage(HttpMethod.Get, "/attr_restrictedsize") { Content = new ReadOnlyMemoryContent("from request"u8.ToArray()) }; 1802var request = new HttpRequestMessage(HttpMethod.Get, "/attr_responseandrequest"); 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")); 1866var request = new HttpRequestMessage(HttpMethod.Get, "/ext_restrictedsize") { Content = new ReadOnlyMemoryContent("from request"u8.ToArray()) }; 1892var request = new HttpRequestMessage(HttpMethod.Get, "/ext_responseandrequest"); 1938var request = new HttpRequestMessage(HttpMethod.Get, "/");
Microsoft.AspNetCore.HttpOverrides.Tests (6)
HttpMethodOverrideMiddlewareTest.cs (6)
39var req = new HttpRequestMessage(HttpMethod.Post, ""); 70var req = new HttpRequestMessage(HttpMethod.Post, ""); 100var req = new HttpRequestMessage(HttpMethod.Get, ""); 133var req = new HttpRequestMessage(HttpMethod.Post, ""); 171var req = new HttpRequestMessage(HttpMethod.Post, ""); 208var req = new HttpRequestMessage(HttpMethod.Post, "");
Microsoft.AspNetCore.HttpsPolicy.Tests (19)
HstsMiddlewareTests.cs (8)
66var request = new HttpRequestMessage(HttpMethod.Get, ""); 112var request = new HttpRequestMessage(HttpMethod.Get, ""); 158var request = new HttpRequestMessage(HttpMethod.Get, ""); 203var request = new HttpRequestMessage(HttpMethod.Get, ""); 258var request = new HttpRequestMessage(HttpMethod.Get, ""); 313var request = new HttpRequestMessage(HttpMethod.Get, ""); 360var request = new HttpRequestMessage(HttpMethod.Get, ""); 406var request = new HttpRequestMessage(HttpMethod.Get, "");
HttpsPolicyTests.cs (2)
65var request = new HttpRequestMessage(HttpMethod.Get, ""); 74request = new HttpRequestMessage(HttpMethod.Get, expectedUrl);
HttpsRedirectionMiddlewareTests.cs (9)
51var request = new HttpRequestMessage(HttpMethod.Get, ""); 106var request = new HttpRequestMessage(HttpMethod.Get, ""); 162var request = new HttpRequestMessage(HttpMethod.Get, ""); 224var request = new HttpRequestMessage(HttpMethod.Get, ""); 264var request = new HttpRequestMessage(HttpMethod.Get, ""); 310var request = new HttpRequestMessage(HttpMethod.Get, ""); 352var request = new HttpRequestMessage(HttpMethod.Get, ""); 400var request = new HttpRequestMessage(HttpMethod.Get, ""); 444var request = new HttpRequestMessage(HttpMethod.Get, "");
Microsoft.AspNetCore.Identity.FunctionalTests (1)
Extensions\HttpClientExtensions.cs (1)
49var submision = new HttpRequestMessage(new HttpMethod(submit.Method.ToString()), target)
Microsoft.AspNetCore.Identity.InMemory.Test (1)
FunctionalTest.cs (1)
430var request = new HttpRequestMessage(HttpMethod.Get, uri);
Microsoft.AspNetCore.Localization.FunctionalTests (2)
LocalizationSampleTest.cs (1)
32var request = new HttpRequestMessage(HttpMethod.Get, "My/Resources");
LocalizationTest.cs (1)
111var request = new HttpRequestMessage();
Microsoft.AspNetCore.Mvc.FunctionalTests (354)
AntiforgeryMiddlewareTest.cs (5)
40var request = new HttpRequestMessage(HttpMethod.Post, "/Test/PostWithRequireAntiforgeryToken"); 83var request = new HttpRequestMessage(HttpMethod.Post, "/Test/PostWithRequireAntiforgeryToken"); 124var request = new HttpRequestMessage(HttpMethod.Post, "/Test/PostWithRequireAntiforgeryTokenAndSizeLimit"); 156var request = new HttpRequestMessage(HttpMethod.Post, "/Test/PostWithRequireAntiforgeryTokenAndFormLimit"); 188var request = new HttpRequestMessage(HttpMethod.Post, "/TestWithRequestSizeLimit/PostWithRequireAntiforgeryTokenAndDisableSizeLimit");
AntiforgeryTests.cs (5)
67var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/Antiforgery/Login"); 117var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/Antiforgery/FlushAsyncLogin"); 147var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/Antiforgery/Login"); 190var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/Antiforgery/Login"); 203var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/Antiforgery/LoginWithRedirectResultFilter");
ApiBehaviorTest.cs (2)
103var requestMessage = new HttpRequestMessage(HttpMethod.Post, "/contact") 119var requestMessage = new HttpRequestMessage(HttpMethod.Post, "/contact")
ApiExplorerTest.cs (2)
415var request = new HttpRequestMessage( 438var request = new HttpRequestMessage(
ApplicationModelTest.cs (1)
126var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Home/GetHelloWorld");
AsyncEnumerableTestBase.cs (1)
75var request = new HttpRequestMessage(HttpMethod.Get, "asyncenumerable/getallprojects");
AuthMiddlewareAndFilterTestBase.cs (20)
56var request = new HttpRequestMessage(HttpMethod.Get, action); 74var request = new HttpRequestMessage(HttpMethod.Get, action); 81request = new HttpRequestMessage(HttpMethod.Get, action); 120var request = new HttpRequestMessage(HttpMethod.Get, "PagesHome"); 130var request = new HttpRequestMessage(HttpMethod.Get, "/Authorized/Api"); 136request = new HttpRequestMessage(HttpMethod.Get, "/Authorized/Api"); 145var request = new HttpRequestMessage(HttpMethod.Get, "/Authorized/AllowAnonymous"); 149request = new HttpRequestMessage(HttpMethod.Get, "/Authorized/Api"); 155request = new HttpRequestMessage(HttpMethod.Get, "/Authorized/Api"); 164var request = new HttpRequestMessage(HttpMethod.Get, "/Authorized/Cookie"); 170request = new HttpRequestMessage(HttpMethod.Get, "/Authorized/Cookie"); 179var request = new HttpRequestMessage(HttpMethod.Get, "/Authorized/AllowAnonymous"); 183request = new HttpRequestMessage(HttpMethod.Get, "/Authorized/Cookie"); 189request = new HttpRequestMessage(HttpMethod.Get, "/Authorized/Cookie"); 198var request = new HttpRequestMessage(HttpMethod.Get, "/Authorized/Cookie"); 204request = new HttpRequestMessage(HttpMethod.Get, "/Authorized/Cookie"); 209request = new HttpRequestMessage(HttpMethod.Get, "/Authorized/Api"); 216request = new HttpRequestMessage(HttpMethod.Get, "/Authorized/Api"); 251var request = new HttpRequestMessage(HttpMethod.Get, url); 258request = new HttpRequestMessage(HttpMethod.Get, url);
AuthMiddlewareUsingRequireAuthTest.cs (2)
47var request = new HttpRequestMessage(HttpMethod.Get, action); 66var request = new HttpRequestMessage(HttpMethod.Get, action);
BasicTests.cs (3)
206var response = await Client.SendAsync(new HttpRequestMessage( 224var response = await Client.SendAsync(new HttpRequestMessage( 649var request = new HttpRequestMessage(HttpMethod.Post, "/Home/Product");
ConsumesAttributeTestsBase.cs (8)
47var request = new HttpRequestMessage( 64var request = new HttpRequestMessage( 81var request = new HttpRequestMessage( 99var request = new HttpRequestMessage( 120var request = new HttpRequestMessage( 144var request = new HttpRequestMessage( 165var request = new HttpRequestMessage( 188var request = new HttpRequestMessage(
ContentNegotiationTest.cs (12)
109var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/ContentNegotiation/UserInfo_ProducesWithTypeOnly"); 126var request = new HttpRequestMessage( 151var request = new HttpRequestMessage( 346var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/ContentNegotiation/UserInfo"); 367var request = new HttpRequestMessage(HttpMethod.Get, "FallbackOnTypeBasedMatch/ReturnString"); 385var request = new HttpRequestMessage(HttpMethod.Get, targetUri); 404var request = new HttpRequestMessage(HttpMethod.Post, targetUri); 420var request = new HttpRequestMessage(HttpMethod.Get, targetUri); 435var request = new HttpRequestMessage(HttpMethod.Get, targetUri); 450var request = new HttpRequestMessage(HttpMethod.Get, targetUri); 489var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/ProducesWithMediaTypeSuffixesController/ContactInfo"); 507var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/ProducesWithMediaTypeSuffixesController/ContactInfo");
ControllerFromServicesTests.cs (1)
35var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/constructorinjection?value=14");
CorsTests.cs (1)
16var request = new HttpRequestMessage(new HttpMethod("OPTIONS"), "http://localhost/NonCors/Post");
CorsTestsBase.cs (15)
44var request = new HttpRequestMessage(new HttpMethod(method), "http://localhost/Cors/GetBlogComments"); 64var request = new HttpRequestMessage(new HttpMethod("OPTIONS"), "http://localhost/NonCors/GetOptions"); 80var request = new HttpRequestMessage(new HttpMethod("OPTIONS"), "http://localhost/NonCors/GetOptions"); 98var request = new HttpRequestMessage(new HttpMethod("OPTIONS"), "http://localhost/NonCors/Post"); 117var request = new HttpRequestMessage( 154var request = new HttpRequestMessage( 186var request = new HttpRequestMessage( 222var request = new HttpRequestMessage(HttpMethod.Put, "http://localhost/Cors/GetUserComments"); 247var request = new HttpRequestMessage(new HttpMethod(method), "http://localhost/Cors/GetExclusiveContent"); 271var request = new HttpRequestMessage( 298var request = new HttpRequestMessage(new HttpMethod(CorsConstants.PreflightHttpMethod), url); 330var request = new HttpRequestMessage(new HttpMethod(CorsConstants.PreflightHttpMethod), url); 367var request = new HttpRequestMessage( 392var request = new HttpRequestMessage( 415var request = new HttpRequestMessage(
CustomValueProviderTest.cs (4)
43var request = new HttpRequestMessage(HttpMethod.Get, url); 60var request = new HttpRequestMessage(HttpMethod.Get, url); 77var request = new HttpRequestMessage(HttpMethod.Get, url); 94var request = new HttpRequestMessage(HttpMethod.Get, url);
DoNotRespectBrowserAcceptHeaderTests.cs (1)
148var request = new HttpRequestMessage(HttpMethod.Get, url);
FileResultTests.cs (31)
59var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/DownloadFiles/DownloadFromDisk"); 81var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/DownloadFiles/DownloadFromDisk"); 101var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/DownloadFiles/DownloadFromDisk"); 123var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/DownloadFiles/DownloadFromDisk_WithLastModifiedAndEtag"); 145var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/DownloadFiles/DownloadFromDiskWithFileName_WithLastModifiedAndEtag"); 165var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/DownloadFiles/DownloadFromDiskWithFileName_WithLastModifiedAndEtag"); 209var httpRequestMessage = new HttpRequestMessage(new HttpMethod(httpMethod), "http://localhost/DownloadFiles/DownloadFromDiskWithFileName"); 227var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/DownloadFiles/DownloadFromDiskWithFileName_WithLastModifiedAndEtag"); 247var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/DownloadFiles/DownloadFromDiskWithFileName_WithLastModifiedAndEtag"); 279var httpRequestMessage = new HttpRequestMessage(HttpMethod.Head, "http://localhost/DownloadFiles/DownloadFromDiskWithFileName_WithLastModifiedAndEtag"); 346var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/DownloadFiles/DownloadFromStream"); 368var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/DownloadFiles/DownloadFromStream"); 388var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/DownloadFiles/DownloadFromStream"); 430var httpRequestMessage = new HttpRequestMessage(new HttpMethod(httpMethod), "http://localhost/DownloadFiles/DownloadFromStreamWithFileName"); 448var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/DownloadFiles/DownloadFromStreamWithFileName_WithEtag"); 468var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/DownloadFiles/DownloadFromStreamWithFileName_WithEtag"); 498var httpRequestMessage = new HttpRequestMessage(HttpMethod.Head, "http://localhost/DownloadFiles/DownloadFromStreamWithFileName_WithEtag"); 547var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/DownloadFiles/DownloadFromBinaryData"); 569var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/DownloadFiles/DownloadFromBinaryData"); 589var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/DownloadFiles/DownloadFromBinaryData"); 634var httpRequestMessage = new HttpRequestMessage(new HttpMethod(httpMethod), "http://localhost/DownloadFiles/DownloadFromBinaryDataWithFileName"); 652var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/DownloadFiles/DownloadFromBinaryDataWithFileName_WithEtag"); 672var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/DownloadFiles/DownloadFromBinaryDataWithFileName_WithEtag"); 704var httpRequestMessage = new HttpRequestMessage(HttpMethod.Head, "http://localhost/DownloadFiles/DownloadFromBinaryDataWithFileName_WithEtag"); 760var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/EmbeddedFiles/DownloadFileWithFileName"); 784var httpRequestMessage = new HttpRequestMessage(new HttpMethod(httpMethod), "http://localhost/EmbeddedFiles/DownloadFileWithFileName_RangeProcessingNotEnabled"); 802var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/EmbeddedFiles/DownloadFileWithFileName_WithEtag"); 825var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/EmbeddedFiles/DownloadFileWithFileName_WithEtag"); 850var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/EmbeddedFiles/DownloadFileWithFileName"); 873var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/EmbeddedFiles/DownloadFileWithFileName"); 908var httpRequestMessage = new HttpRequestMessage(HttpMethod.Head, "http://localhost/EmbeddedFiles/DownloadFileWithFileName");
FiltersTest.cs (1)
87var request = new HttpRequestMessage(HttpMethod.Post, url)
FormFileUploadTest.cs (2)
39var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/UploadFiles"); 67var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/UploadProductSpecs");
GlobalAuthorizationFilterTestBase.cs (1)
72var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Administration/EitherCookie");
HtmlGenerationTest.cs (7)
324var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/Customer/HtmlGeneration_Customer"); 350var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Customer/HtmlGeneration_Customer/CustomerWithRecords"); 376var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/Customer/HtmlGeneration_Customer/CustomerWithRecords"); 504var request = new HttpRequestMessage(HttpMethod.Get, "/catalog/cart?correlationid=2"); 617var requestMessage = new HttpRequestMessage(HttpMethod.Post, "/categories/Electronics"); 786var request = new HttpRequestMessage(HttpMethod.Post, "HtmlGeneration_Home/ValidationProviderAttribute"); 806var request = new HttpRequestMessage(HttpMethod.Get, url);
InputObjectValidationTests.cs (4)
268var requestMessage = new HttpRequestMessage(HttpMethod.Post, "Validation/ValidationThrowsError_WhenValidationExceedsMaxValidationDepth") 289var requestMessage = new HttpRequestMessage(HttpMethod.Post, "TestApi/PostBookWithNoValidation") 318var requestMessage = new HttpRequestMessage(HttpMethod.Post, "TestApi/PostBookWithNoValidation") 350var requestMessage = new HttpRequestMessage(HttpMethod.Post, "TestApi/PostBookWithNoValidation")
JsonInputFormatterTestBase.cs (1)
223var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/JsonFormatter/ReturnInput/");
JsonOutputFormatterTestBase.cs (1)
51var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/SerializableError/CreateEmployee");
JsonPatchInputFormatterTest.cs (1)
165return new HttpRequestMessage
JsonResultWithNewtonsoftJsonTest.cs (6)
43var request = new HttpRequestMessage(HttpMethod.Get, url); 64var request = new HttpRequestMessage(HttpMethod.Get, url); 83var request = new HttpRequestMessage(HttpMethod.Get, url); 101var request = new HttpRequestMessage(HttpMethod.Get, url); 118var request = new HttpRequestMessage(HttpMethod.Get, url); 134var request = new HttpRequestMessage(HttpMethod.Get, url);
JsonResultWithSystemTextJsonTest.cs (6)
43var request = new HttpRequestMessage(HttpMethod.Get, url); 64var request = new HttpRequestMessage(HttpMethod.Get, url); 83var request = new HttpRequestMessage(HttpMethod.Get, url); 101var request = new HttpRequestMessage(HttpMethod.Get, url); 118var request = new HttpRequestMessage(HttpMethod.Get, url); 134var request = new HttpRequestMessage(HttpMethod.Get, url);
KeyedServicesTests.cs (6)
33var okRequest = new HttpRequestMessage(HttpMethod.Get, "/services/GetOk"); 34var notokRequest = new HttpRequestMessage(HttpMethod.Get, "/services/GetNotOk"); 51var request = new HttpRequestMessage(HttpMethod.Get, "/services/GetBoth"); 65var request = new HttpRequestMessage(HttpMethod.Get, "/services/GetKeyNull"); 79var request = new HttpRequestMessage(HttpMethod.Get, "/services/GetOptionalNotRegistered"); 93var request = new HttpRequestMessage(HttpMethod.Get, "/services/GetRequiredNotRegistered");
NonNullableReferenceTypesTest.cs (2)
52var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/NonNullable"); 94var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/NonNullable");
RazorPageModelTest.cs (6)
39var request = new HttpRequestMessage(HttpMethod.Post, "Pages/TryUpdateModel/10") 64var request = new HttpRequestMessage(HttpMethod.Post, "Pages/TryValidateModel/10") 89var request = new HttpRequestMessage(HttpMethod.Post, "Pages/TryValidateModel/10") 115var request = new HttpRequestMessage(HttpMethod.Post, "Pages/TryUpdateModelPageModel/10") 140var request = new HttpRequestMessage(HttpMethod.Post, "Pages/TryValidateModelPageModel/10") 165var request = new HttpRequestMessage(HttpMethod.Post, "Pages/TryValidateModelPageModel/10")
RazorPagesTest.cs (44)
101var postRequest = new HttpRequestMessage(HttpMethod.Post, "http://localhost/HandlerTestPage"); 133var postRequest = new HttpRequestMessage(HttpMethod.Post, "http://localhost/HandlerTestPage/CustomActionResult"); 214var postRequest = new HttpRequestMessage(HttpMethod.Post, "http://localhost/ModelHandlerTestPage"); 246var postRequest = new HttpRequestMessage(HttpMethod.Post, "http://localhost/ModelHandlerTestPage/CustomActionResult"); 272var routeRequest = new HttpRequestMessage(HttpMethod.Get, "http://localhost/RouteData/pizza"); 285var routeRequest = new HttpRequestMessage(HttpMethod.Get, "http://localhost/RouteData/5"); 301var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/PathSet"); 317var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/TagHelpers"); 333var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/NoPage"); 346var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Pages/HandlerWithParameter"); 362var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/HelloWorld"); 378var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/HelloWorldWithRoute/Some/Path/route"); 394var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/HelloWorldWithHandler?message=handler"); 410var getRequest = new HttpRequestMessage(HttpMethod.Get, "http://localhost/HelloWorldWithPageModelHandler?message=message"); 416var postRequest = new HttpRequestMessage(HttpMethod.Post, "http://localhost/HelloWorldWithPageModelHandler"); 437var request = new HttpRequestMessage(new HttpMethod(httpMethod), url); 466var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/PageWithoutContent/No/Content/Path"); 482var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/OnGetView"); 499var request = new HttpRequestMessage(HttpMethod.Get, url); 508request = new HttpRequestMessage(HttpMethod.Get, response.Headers.Location); 524var request = new HttpRequestMessage(HttpMethod.Get, url); 533request = new HttpRequestMessage(HttpMethod.Get, response.Headers.Location); 549var request = new HttpRequestMessage(HttpMethod.Get, url); 558request = new HttpRequestMessage(HttpMethod.Get, response.Headers.Location); 573var getRequest = new HttpRequestMessage(HttpMethod.Get, "http://localhost/TempData/TempDataPageModelProperty"); 580var request = new HttpRequestMessage(HttpMethod.Post, url); 594request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/TempData/TempDataPageModelProperty"); 671var request = new HttpRequestMessage(HttpMethod.Post, "Pages/PropertyBinding/PagePropertyBinding/10") 700var request = new HttpRequestMessage(HttpMethod.Post, "Pages/PropertyBinding/PagePropertyBinding/27") 726var request = new HttpRequestMessage(HttpMethod.Post, "Pages/PropertyBinding/PageModelWithPropertyBinding/10?PropertyWithSupportGetsTrue=foo") 757var request = new HttpRequestMessage(HttpMethod.Post, url) 786var request = new HttpRequestMessage(HttpMethod.Post, "Pages/PropertyBinding/PolymorphicBinding") 811var request = new HttpRequestMessage(HttpMethod.Post, "Pages/PropertyBinding/PolymorphicBinding") 842var request = new HttpRequestMessage(HttpMethod.Post, "Pages/PropertyBinding/PageWithPropertyAndArgumentBinding?id=11") 867var request = new HttpRequestMessage(HttpMethod.Get, "Pages/PropertyBinding/PageWithPropertyAndArgumentBinding?id=11") 890var request = new HttpRequestMessage(HttpMethod.Head, "Pages/PropertyBinding/PageModelWithPropertyBinding/10?PropertyWithSupportGetsTrue=foo"); 906var request = new HttpRequestMessage(HttpMethod.Head, "Pages/PropertyBinding/BindPropertyWithGet?value=11"); 923var request = new HttpRequestMessage(HttpMethod.Get, "Pages/PropertyBinding/BindPropertyWithGet?value=11"); 983var request = new HttpRequestMessage(HttpMethod.Post, "/Pages/Redirects/RedirectToSelf") 1288var request = new HttpRequestMessage(HttpMethod.Post, "/Pages/PropertyBinding/BindPropertiesOnModel?Property1=123") 1326var request = new HttpRequestMessage(HttpMethod.Post, "/Pages/PropertyBinding/BindPropertiesOnModel?Property1=123") 1455var request = new HttpRequestMessage(HttpMethod.Options, "http://localhost/HelloWorld"); 1471var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/HelloWorldWithOptionsHandler"); 1487var request = new HttpRequestMessage(HttpMethod.Options, "http://localhost/HelloWorldWithOptionsHandler");
RazorPagesWithBasePathTest.cs (8)
432var message = new HttpRequestMessage(HttpMethod.Post, "/CustomModelTypeModel") 461var message = new HttpRequestMessage(HttpMethod.Post, "/CustomModelTypeModel?Attempts=3") 489var message = new HttpRequestMessage(HttpMethod.Post, "/CustomModelTypeModel") 616var request = new HttpRequestMessage(HttpMethod.Head, "/Antiforgery/AntiforgeryDefault"); 629var request = new HttpRequestMessage(HttpMethod.Post, "/Antiforgery/AntiforgeryDefault"); 642var request = new HttpRequestMessage(HttpMethod.Post, "/Antiforgery/AntiforgeryDefault"); 656var request = new HttpRequestMessage(HttpMethod.Post, "/Antiforgery/IgnoreAntiforgery"); 707var request = new HttpRequestMessage(HttpMethod.Post, url)
ReadFromDisconnectedClientTest.cs (2)
42var request = new HttpRequestMessage(HttpMethod.Post, "ReadFromThrowingRequestBody/AppliesAntiforgeryValidation"); 55var request = new HttpRequestMessage(HttpMethod.Post, "ReadFromThrowingRequestBody/ReadForm");
RequestFormLimitsTest.cs (4)
39var request = new HttpRequestMessage(); 61var request = new HttpRequestMessage(); 84var request = new HttpRequestMessage(); 156var request = new HttpRequestMessage();
RequestServicesTestBase.cs (4)
53var request = new HttpRequestMessage(HttpMethod.Get, url); 76var request = new HttpRequestMessage(HttpMethod.Get, url); 96var request1 = new HttpRequestMessage(HttpMethod.Get, url); 105var request2 = new HttpRequestMessage(HttpMethod.Get, url);
RequestSizeLimitTest.cs (3)
40var request = new HttpRequestMessage(); 62var request = new HttpRequestMessage(); 81var request = new HttpRequestMessage();
RespectBrowserAcceptHeaderTests.cs (2)
43var request = new HttpRequestMessage(HttpMethod.Get, "RespectBrowserAcceptHeader/ReturnString"); 62var request = new HttpRequestMessage(HttpMethod.Get, "RespectBrowserAcceptHeader/ReturnString");
RoutingAcrossPipelineBranchesTest.cs (12)
42var subdirRequest = new HttpRequestMessage(HttpMethod.Get, "subdir/literal/Branches/Index/s"); 43var commonRequest = new HttpRequestMessage(HttpMethod.Get, "common/Branches/Index/c/literal"); 44var defaultRequest = new HttpRequestMessage(HttpMethod.Get, "Branches/literal/Index/d"); 77var subdirRequest = new HttpRequestMessage(HttpMethod.Get, "subdir/literal/Branches/Index/s" + linkQuery); 78var commonRequest = new HttpRequestMessage(HttpMethod.Get, "common/Branches/Index/c/literal" + linkQuery); 79var defaultRequest = new HttpRequestMessage(HttpMethod.Get, "Branches/literal/Index/d" + linkQuery); 111var subdirRequest = new HttpRequestMessage(HttpMethod.Get, "subdir/literal/Branches/Index/s" + linkQuery + "&link_common=c&link_subdir"); 112var defaultRequest = new HttpRequestMessage(HttpMethod.Get, "Branches/literal/Index/d" + linkQuery + "&link_subdir=s"); 140var commonRequest = new HttpRequestMessage(HttpMethod.Get, "common/literal/Branches/Index/s"); 141var subdirRequest = new HttpRequestMessage(HttpMethod.Get, "subdir/Branches/Index/c/literal"); 142var defaultRequest = new HttpRequestMessage(HttpMethod.Get, "common/Branches/literal/Index/d"); 163var request = new HttpRequestMessage(HttpMethod.Get, "dynamicattributeorder/dynamic/route/rest");
RoutingDynamicOrderTest.cs (6)
44var request = new HttpRequestMessage(HttpMethod.Get, url); 66var request = new HttpRequestMessage(HttpMethod.Get, url); 89var request = new HttpRequestMessage(HttpMethod.Get, url); 111var request = new HttpRequestMessage(HttpMethod.Get, url); 133var request = new HttpRequestMessage(HttpMethod.Get, url); 155var request = new HttpRequestMessage(HttpMethod.Get, url);
RoutingDynamicTest.cs (7)
40var request = new HttpRequestMessage(HttpMethod.Get, url); 55var request = new HttpRequestMessage(HttpMethod.Get, url); 70var request = new HttpRequestMessage(HttpMethod.Get, url); 86var request = new HttpRequestMessage(HttpMethod.Get, url); 100var request = new HttpRequestMessage(HttpMethod.Post, url); 116var request = new HttpRequestMessage(HttpMethod.Get, url); 132var request = new HttpRequestMessage(HttpMethod.Get, url);
RoutingFallbackTest.cs (7)
41var request = new HttpRequestMessage(HttpMethod.Get, url); 56var request = new HttpRequestMessage(HttpMethod.Get, url); 72var request = new HttpRequestMessage(HttpMethod.Get, url); 88var request = new HttpRequestMessage(HttpMethod.Post, url); 104var request = new HttpRequestMessage(HttpMethod.Post, url); 120var request = new HttpRequestMessage(HttpMethod.Get, url); 136var request = new HttpRequestMessage(HttpMethod.Post, url)
RoutingTests.cs (1)
36var response = await Client.SendAsync(new HttpRequestMessage(new HttpMethod("POST"), url));
RoutingTestsBase.cs (18)
401var request = new HttpRequestMessage(new HttpMethod(method), $"http://localhost{url}"); 454var request = new HttpRequestMessage(new HttpMethod(method), $"http://localhost{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)); 609var response = await Client.SendAsync(new HttpRequestMessage(new HttpMethod(method), url)); 703var message = new HttpRequestMessage(new HttpMethod(method), "http://localhost/Store/Shop/Orders"); 728var message = new HttpRequestMessage(new HttpMethod(method), "http://localhost/api/Employee/5/Salary"); 748var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Store/Shop/Orders"); 771var message = new HttpRequestMessage(new HttpMethod(verb), "http://localhost/api/Employee"); 793var message = new HttpRequestMessage(new HttpMethod(verb), "http://localhost/api/Employee/Manager"); 818var message = new HttpRequestMessage(new HttpMethod(verb), "http://localhost/" + path); 838var message = new HttpRequestMessage(new HttpMethod("MERGE"), "http://localhost/api/Employee/5"); 861var message = new HttpRequestMessage(new HttpMethod(verb), "http://localhost/api/Employee/5/Administrator"); 1064var message = new HttpRequestMessage(new HttpMethod(method), "http://localhost/api/Company/5"); 1486var request = new HttpRequestMessage(new HttpMethod(verb), "http://localhost" + path); 1521var request = new HttpRequestMessage(new HttpMethod(verb), "http://localhost" + path); 1538var request = new HttpRequestMessage(new HttpMethod(verb), "http://localhost" + path);
SerializableErrorTests.cs (4)
50var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/SerializableError/ModelStateErrors"); 72var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/SerializableError/LogErrors") 120var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/SerializableError/CreateEmployee"); 161var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/SerializableError/CreateEmployee");
SimpleWithWebApplicationBuilderTests.cs (2)
232var request = new HttpRequestMessage(HttpMethod.Post, "accepts-default"); 247var request = new HttpRequestMessage(HttpMethod.Post, "accepts-xml");
TagHelperComponentTagHelperTest.cs (3)
37var request = new HttpRequestMessage(HttpMethod.Get, url); 57var request = new HttpRequestMessage(HttpMethod.Get, url); 77var request = new HttpRequestMessage(HttpMethod.Get, url);
TagHelpersFromServicesTest.cs (1)
34var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/another/inservicestaghelper");
TempDataInCookiesUsingCookieConsentTest.cs (2)
94var request = new HttpRequestMessage(HttpMethod.Get, path); 101var request = new HttpRequestMessage(HttpMethod.Post, path);
TempDataPropertyTest.cs (1)
162var request = new HttpRequestMessage(HttpMethod.Get, path);
TempDataTestBase.cs (1)
264var request = new HttpRequestMessage(HttpMethod.Get, path);
TestingInfrastructureTests.cs (7)
56var request = new HttpRequestMessage(HttpMethod.Post, "Testing/RedirectHandler/2") 77var request = new HttpRequestMessage(HttpMethod.Post, "Testing/RedirectHandler/2") 100var request = new HttpRequestMessage(HttpMethod.Get, "Testing/RedirectHandler/Headers"); 116var request = new HttpRequestMessage(HttpMethod.Get, "Testing/RedirectHandler/Redirect303"); 130var request = new HttpRequestMessage(HttpMethod.Get, "Testing/RedirectHandler/Relative/"); 143var request = new HttpRequestMessage(HttpMethod.Get, "Testing/RedirectHandler/Redirect303"); 234var request = new HttpRequestMessage(HttpMethod.Get, "Testing/RedirectHandler/RedirectToAuthorized");
VersioningEndpointRoutingTests.cs (2)
34var message = new HttpRequestMessage(HttpMethod.Delete, "http://localhost/" + "Customers/5?version=2"); 53var message = new HttpRequestMessage(HttpMethod.Post, "http://localhost/" + "Customers?version=2");
VersioningTestsBase.cs (24)
45var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/api/Addresses?version=" + version); 68var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/api/Addresses/All" + query); 89var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Tickets"); 110var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Tickets?version=2"); 129var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Tickets/5"); 148var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Tickets/5?version=2"); 175var message = new HttpRequestMessage(HttpMethod.Post, "http://localhost/Tickets?version=" + version); 199var message = new HttpRequestMessage(HttpMethod.Post, "http://localhost/Tickets"); 224var message = new HttpRequestMessage(new HttpMethod(method), "http://localhost/Tickets/5?version=" + version); 250var message = new HttpRequestMessage(new HttpMethod(method), "http://localhost/Tickets/5"); 269var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Books?version=" + version); 291var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Books?version=" + version); 312var message = new HttpRequestMessage(new HttpMethod(method), "http://localhost/Movies"); 333var message = new HttpRequestMessage(new HttpMethod(method), "http://localhost/Movies?version=2"); 355var message = new HttpRequestMessage(new HttpMethod(method), "http://localhost/Movies/5"); 376var message = new HttpRequestMessage(new HttpMethod(method), "http://localhost/Movies/5?version=2"); 395var message = new HttpRequestMessage(HttpMethod.Put, "http://localhost/Movies/5?version=2"); 417var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/" + url); 438var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/" + url); 459var message = new HttpRequestMessage(HttpMethod.Post, "http://localhost/" + url); 483var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/" + url + query); 502var message = new HttpRequestMessage(HttpMethod.Post, "http://localhost/" + "Customers?version=2"); 521var message = new HttpRequestMessage(HttpMethod.Delete, "http://localhost/" + "Customers/5?version=2"); 543var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost" + path);
ViewComponentFromServicesTests.cs (1)
35var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/another/InServicesViewComponent");
ViewEngineTests.cs (2)
163var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/TemplateExpander"); 307var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/TemplateExpander/ViewWithLayout");
XmlDataContractSerializerFormattersWrappingTest.cs (8)
44var request = new HttpRequestMessage(HttpMethod.Get, url); 68var request = new HttpRequestMessage(HttpMethod.Get, url); 92var request = new HttpRequestMessage(HttpMethod.Get, url); 115var request = new HttpRequestMessage(HttpMethod.Get, url); 138var request = new HttpRequestMessage(HttpMethod.Get, url); 163var request = new HttpRequestMessage(HttpMethod.Get, url); 186var request = new HttpRequestMessage(HttpMethod.Get, url); 207var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/IEnumerable/SerializableErrors");
XmlDataContractSerializerInputFormatterTest.cs (2)
58var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/Validation/CreateStore"); 86var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/Validation/CreateStore");
XmlOutputFormatterTests.cs (10)
40var request = new HttpRequestMessage( 62var request = new HttpRequestMessage( 85var request = new HttpRequestMessage( 106var request = new HttpRequestMessage( 129var request = new HttpRequestMessage( 150var request = new HttpRequestMessage( 168var request = new HttpRequestMessage( 188var request = new HttpRequestMessage( 208var request = new HttpRequestMessage( 229var request = new HttpRequestMessage(
XmlSerializerFormattersWrappingTest.cs (8)
43var request = new HttpRequestMessage(HttpMethod.Get, url); 64var request = new HttpRequestMessage(HttpMethod.Get, url); 85var request = new HttpRequestMessage(HttpMethod.Get, url); 105var request = new HttpRequestMessage(HttpMethod.Get, url); 125var request = new HttpRequestMessage(HttpMethod.Get, url); 147var request = new HttpRequestMessage(HttpMethod.Get, url); 167var request = new HttpRequestMessage(HttpMethod.Get, url); 185var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/IEnumerable/SerializableErrors");
Microsoft.AspNetCore.Mvc.Testing (1)
Handlers\RedirectHandler.cs (1)
48var redirectRequest = new HttpRequestMessage();
Microsoft.AspNetCore.OutputCaching.Tests (7)
OutputCacheTests.cs (6)
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, "")); 962() => client.SendAsync(new HttpRequestMessage(HttpMethod.Get, ""))); 1003var resp = await client.SendAsync(new HttpRequestMessage(HttpMethod.Get, ""));
TestUtils.cs (1)
271return new HttpRequestMessage(new HttpMethod(method), requestUri);
Microsoft.AspNetCore.RequestDecompression.Tests (6)
RequestDecompressionMiddlewareTests.cs (6)
239using var request = new HttpRequestMessage(HttpMethod.Post, ""); 310using var request = new HttpRequestMessage(HttpMethod.Post, ""); 386using var request = new HttpRequestMessage(HttpMethod.Post, ""); 488using var request = new HttpRequestMessage(HttpMethod.Post, ""); 572using var request = new HttpRequestMessage(HttpMethod.Post, ""); 723using var request = new HttpRequestMessage(HttpMethod.Post, "");
Microsoft.AspNetCore.ResponseCaching.Tests (5)
ResponseCachingTests.cs (4)
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, ""));
TestUtils.cs (1)
257return new HttpRequestMessage(new HttpMethod(method), requestUri);
Microsoft.AspNetCore.ResponseCompression.Tests (17)
ResponseCompressionMiddlewareTest.cs (17)
177var request = new HttpRequestMessage(HttpMethod.Get, ""); 335var request = new HttpRequestMessage(HttpMethod.Get, ""); 474var request = new HttpRequestMessage(HttpMethod.Get, ""); 537var request = new HttpRequestMessage(HttpMethod.Get, ""); 600var request = new HttpRequestMessage(HttpMethod.Get, ""); 653var request = new HttpRequestMessage(HttpMethod.Get, ""); 698var request = new HttpRequestMessage(HttpMethod.Get, ""); 750var request = new HttpRequestMessage(HttpMethod.Get, ""); 803var request = new HttpRequestMessage(HttpMethod.Get, ""); 873var request = new HttpRequestMessage(HttpMethod.Get, ""); 937var request = new HttpRequestMessage(HttpMethod.Get, ""); 1001var request = new HttpRequestMessage(HttpMethod.Get, ""); 1062var request = new HttpRequestMessage(HttpMethod.Get, ""); 1112var request = new HttpRequestMessage(HttpMethod.Get, ""); 1162var request = new HttpRequestMessage(HttpMethod.Get, ""); 1212var request = new HttpRequestMessage(HttpMethod.Get, ""); 1278var request = new HttpRequestMessage(new HttpMethod(httpMethod), "");
Microsoft.AspNetCore.Routing.FunctionalTests (33)
EndpointRoutingSampleTest.cs (1)
36var message = new HttpRequestMessage(HttpMethod.Get, $"{branch}/api/get/5");
HostMatchingTests.cs (5)
32var request = new HttpRequestMessage(HttpMethod.Get, "api/DomainWildcard"); 50var request = new HttpRequestMessage(HttpMethod.Get, "api/DomainWildcard"); 68var request = new HttpRequestMessage(HttpMethod.Get, "api/DomainWildcard"); 86var request = new HttpRequestMessage(HttpMethod.Get, "api/DomainWildcard"); 104var request = new HttpRequestMessage(HttpMethod.Get, "api/DomainWildcard");
MapFallbackTest.cs (5)
25var request = new HttpRequestMessage(HttpMethod.Get, "helloworld"); 42var request = new HttpRequestMessage(HttpMethod.Get, path); 59var request = new HttpRequestMessage(HttpMethod.Get, path); 76var request = new HttpRequestMessage(HttpMethod.Get, path); 93var request = new HttpRequestMessage(HttpMethod.Get, path);
MinimalFormTests.cs (13)
53var request = new HttpRequestMessage(HttpMethod.Post, "todo"); 113var request = new HttpRequestMessage(HttpMethod.Post, "todo"); 160var request = new HttpRequestMessage(HttpMethod.Post, "todo"); 199var request = new HttpRequestMessage(HttpMethod.Post, "todo"); 276var request = new HttpRequestMessage(HttpMethod.Post, "todo"); 323var request = new HttpRequestMessage(HttpMethod.Post, "todo"); 419var request = new HttpRequestMessage(HttpMethod.Post, "todo"); 474var request = new HttpRequestMessage(HttpMethod.Post, "todo"); 533var request = new HttpRequestMessage(HttpMethod.Post, "todo"); 585var request = new HttpRequestMessage(HttpMethod.Post, "/todos/1"); 637var request = new HttpRequestMessage(HttpMethod.Post, "/todos/1"); 686var request = new HttpRequestMessage(HttpMethod.Post, "todo"); 750var response = await client.SendAsync(new HttpRequestMessage(HttpMethod.Post, "/")
RouterSampleTest.cs (4)
34var message = new HttpRequestMessage(HttpMethod.Get, $"{branch}/api/get/5"); 48var message = new HttpRequestMessage(HttpMethod.Get, "api/get/5"); 62var message = new HttpRequestMessage(HttpMethod.Get, "api/middleware"); 83var message = new HttpRequestMessage(new HttpMethod(httpVerb), "api/all/Joe/Duf");
WebHostBuilderExtensionsTest.cs (5)
25new HttpRequestMessage(HttpMethod.Get, "greeting/James"), 37new HttpRequestMessage(HttpMethod.Post, "greeting/James") { Content = new StringContent("Biography") }, 49new HttpRequestMessage(HttpMethod.Put, "greeting/James") { Content = new StringContent("Biography") }, 54new HttpRequestMessage(HttpMethod.Delete, "greeting/James"), 67new HttpRequestMessage(HttpMethod.Post, "greeting/James") { Content = new StringContent("Biography") },
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (6)
Http3Tests.cs (1)
75var request = new HttpRequestMessage(HttpMethod.Get, address);
Listener\ResponseHeaderTests.cs (2)
342var request = new HttpRequestMessage(HttpMethod.Get, uri); 356var request = new HttpRequestMessage(HttpMethod.Head, uri);
OpaqueUpgradeTests.cs (1)
297var request = new HttpRequestMessage(HttpMethod.Post, address);
ResponseHeaderTests.cs (2)
172HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, address); 199HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, address);
Microsoft.AspNetCore.Server.IISIntegration.Tests (10)
IISMiddlewareTests.cs (10)
54var req = new HttpRequestMessage(HttpMethod.Get, ""); 92var req = new HttpRequestMessage(HttpMethod.Get, ""); 134var request = new HttpRequestMessage(HttpMethod.Post, requestPath); 193var request = new HttpRequestMessage(method, "/iisintegration"); 238var request = new HttpRequestMessage(HttpMethod.Post, path); 283var request = new HttpRequestMessage(HttpMethod.Post, "/iisintegration"); 383var request = new HttpRequestMessage(HttpMethod.Get, "/PathBase/Path"); 424var req = new HttpRequestMessage(HttpMethod.Get, ""); 481var req = new HttpRequestMessage(HttpMethod.Get, ""); 526var req = new HttpRequestMessage(HttpMethod.Get, "");
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (7)
WebHostTests.cs (7)
79var request = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 246var request1 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 260var request2 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 317var request1 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 330var request2 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 352var request1 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{http3Port}/"); 366var request2 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{http1Port}/");
Microsoft.AspNetCore.SpaServices.Extensions (2)
AngularCli\AngularCliMiddleware.cs (1)
114new HttpRequestMessage(HttpMethod.Head, cliServerUri),
Proxying\SpaProxy.cs (1)
133var requestMessage = new HttpRequestMessage();
Microsoft.AspNetCore.StaticAssets.Tests (30)
StaticAssetsIntegrationTests.cs (30)
438var message = new HttpRequestMessage(HttpMethod.Get, "/sample.txt"); 651var req = new HttpRequestMessage(method, "http://localhost/sample.txt"); 664var req = new HttpRequestMessage(method, "http://localhost/sample.txt"); 675var req = new HttpRequestMessage(method, "http://localhost/sample.txt"); 686var req = new HttpRequestMessage(method, "http://localhost/sample.txt"); 713var req2 = new HttpRequestMessage(method, "http://localhost/sample.txt"); 726var req2 = new HttpRequestMessage(method, "http://localhost/sample.txt"); 739var req2 = new HttpRequestMessage(method, "http://localhost/sample.txt"); 762new HttpRequestMessage(method, "http://localhost/sample.txt")); 783var req1 = new HttpRequestMessage(method, "http://localhost/sample.txt"); 786var req2 = new HttpRequestMessage(method, "http://localhost/sample.txt"); 799var req1 = new HttpRequestMessage(method, "http://localhost/sample.txt"); 803var req2 = new HttpRequestMessage(method, "http://localhost/sample.txt"); 810var req3 = new HttpRequestMessage(method, "http://localhost/sample.txt"); 822var req1 = new HttpRequestMessage(method, "http://localhost/sample.txt"); 829var req2 = new HttpRequestMessage(method, "http://localhost/sample.txt"); 834var req3 = new HttpRequestMessage(method, "http://localhost/sample.txt"); 839var req4 = new HttpRequestMessage(method, "http://localhost/sample.txt"); 867var req = new HttpRequestMessage(method, "http://localhost/sample.txt"); 880var req = new HttpRequestMessage(method, "http://localhost/sample.txt"); 901new HttpRequestMessage(method, "http://localhost/sample.txt")); 903var req2 = new HttpRequestMessage(method, "http://localhost/sample.txt"); 916new HttpRequestMessage(method, "http://localhost/sample.txt")); 927var req2 = new HttpRequestMessage(method, "sample.txt"); 942new HttpRequestMessage(method, "http://localhost/sample.txt")); 944var req2 = new HttpRequestMessage(method, "http://localhost/sample.txt"); 957var req = new HttpRequestMessage(method, "http://localhost/sample.txt"); 969var req = new HttpRequestMessage(method, "http://localhost/sample.txt"); 983new HttpRequestMessage(method, "http://localhost/sample.txt")); 985var req2 = new HttpRequestMessage(method, "http://localhost/sample.txt");
Microsoft.AspNetCore.StaticFiles.FunctionalTests (1)
StaticFileMiddlewareTests.cs (1)
201var request = new HttpRequestMessage(HttpMethod.Head, requestUrl);
Microsoft.AspNetCore.StaticFiles.Tests (32)
CacheHeaderTests.cs (8)
50var req = new HttpRequestMessage(method, "http://localhost/SubFolder/extra.xml"); 64var req = new HttpRequestMessage(method, "http://localhost/SubFolder/extra.xml"); 76var req = new HttpRequestMessage(method, "http://localhost/SubFolder/extra.xml"); 88var req = new HttpRequestMessage(method, "http://localhost/SubFolder/extra.xml"); 116var req2 = new HttpRequestMessage(method, "http://localhost/SubFolder/extra.xml"); 130var req2 = new HttpRequestMessage(method, "http://localhost/SubFolder/extra.xml"); 144var req2 = new HttpRequestMessage(method, "http://localhost/SubFolder/extra.xml"); 168new HttpRequestMessage(method, "http://localhost/SubFolder/extra.xml"));
RangeHeaderTests.cs (24)
23var req = new HttpRequestMessage(HttpMethod.Get, "http://localhost/SubFolder/ranges.txt"); 44var req = new HttpRequestMessage(HttpMethod.Head, "http://localhost/SubFolder/ranges.txt"); 65var req = new HttpRequestMessage(HttpMethod.Get, "http://localhost/SubFolder/ranges.txt"); 82var req = new HttpRequestMessage(HttpMethod.Get, "http://localhost/SubFolder/ranges.txt"); 99var req = new HttpRequestMessage(HttpMethod.Get, "http://localhost/SubFolder/ranges.txt"); 116var req = new HttpRequestMessage(HttpMethod.Head, "http://localhost/SubFolder/ranges.txt"); 135var req = new HttpRequestMessage(HttpMethod.Get, "http://localhost/SubFolder/ranges.txt"); 152var req = new HttpRequestMessage(HttpMethod.Head, "http://localhost/SubFolder/ranges.txt"); 171var req = new HttpRequestMessage(HttpMethod.Get, "http://localhost/SubFolder/ranges.txt"); 190var req = new HttpRequestMessage(HttpMethod.Head, "http://localhost/SubFolder/ranges.txt"); 210var req = new HttpRequestMessage(HttpMethod.Get, "http://localhost/SubFolder/ranges.txt"); 218req = new HttpRequestMessage(HttpMethod.Get, "http://localhost/SubFolder/ranges.txt"); 237var req = new HttpRequestMessage(HttpMethod.Head, "http://localhost/SubFolder/ranges.txt"); 245req = new HttpRequestMessage(HttpMethod.Head, "http://localhost/SubFolder/ranges.txt"); 270var req = new HttpRequestMessage(HttpMethod.Get, "http://localhost/SubFolder/ranges.txt"); 291var req = new HttpRequestMessage(HttpMethod.Get, "http://localhost/SubFolder/SingleByte.txt"); 312var req = new HttpRequestMessage(HttpMethod.Get, "http://localhost/SubFolder/Empty.txt"); 326var req = new HttpRequestMessage(HttpMethod.Head, "http://localhost/SubFolder/ranges.txt"); 344var req = new HttpRequestMessage(HttpMethod.Get, "http://localhost/SubFolder/ranges.txt"); 359var req = new HttpRequestMessage(HttpMethod.Head, "http://localhost/SubFolder/ranges.txt"); 379var req = new HttpRequestMessage(HttpMethod.Get, "http://localhost/SubFolder/ranges.txt"); 401var req = new HttpRequestMessage(HttpMethod.Head, "http://localhost/SubFolder/ranges.txt"); 422var req = new HttpRequestMessage(HttpMethod.Get, "http://localhost/SubFolder/ranges.txt"); 442var req = new HttpRequestMessage(HttpMethod.Head, "http://localhost/SubFolder/ranges.txt");
Microsoft.AspNetCore.TestHost (1)
RequestBuilder.cs (1)
23_req = new HttpRequestMessage(HttpMethod.Get, path);
Microsoft.AspNetCore.TestHost.Tests (17)
ClientHandlerTests.cs (5)
219var message = new HttpRequestMessage(HttpMethod.Post, "https://example.com/"); 314var message = new HttpRequestMessage(HttpMethod.Post, "https://example.com/"); 342var message = new HttpRequestMessage(HttpMethod.Post, "https://example.com/"); 360HttpRequestMessage message = new HttpRequestMessage(HttpMethod.Post, "https://example.com/"); 497using (var message = new HttpRequestMessage(HttpMethod.Post, "https://example.com/"))
TestClientTests.cs (11)
196var httpRequest = new HttpRequestMessage(HttpMethod.Post, "http://localhost:12345"); 253var message = new HttpRequestMessage(HttpMethod.Post, "https://example.com/"); 304var httpRequest = new HttpRequestMessage(HttpMethod.Post, "http://localhost:12345"); 361var httpRequest = new HttpRequestMessage(HttpMethod.Post, "http://localhost:12345"); 423var httpRequest = new HttpRequestMessage(HttpMethod.Post, "http://localhost:12345"); 470var httpRequest = new HttpRequestMessage(HttpMethod.Post, "http://localhost:12345"); 521var httpRequest = new HttpRequestMessage(HttpMethod.Post, "http://localhost:12345"); 850var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost:12345"); 952var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost:12345"); 978var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost:12345"); 1005var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost:12345");
TestServerTests.cs (1)
790var request = new HttpRequestMessage(HttpMethod.Get, uri);
Microsoft.AspNetCore.Testing.Tests (2)
FakeCertificateHttpClientHandlerTests.cs (1)
18private readonly HttpRequestMessage _request = new();
FakesExtensionsTests.cs (1)
89using var response = await client.SendAsync(new HttpRequestMessage());
Microsoft.AspNetCore.WebSockets.Tests (7)
WebSocketCompressionMiddlewareTests.cs (3)
34using (var request = new HttpRequestMessage(HttpMethod.Get, uri.ToString())) 62using (var request = new HttpRequestMessage(HttpMethod.Get, uri.ToString())) 96using (var request = new HttpRequestMessage(HttpMethod.Get, uri.ToString()))
WebSocketMiddlewareTests.cs (4)
675using (var request = new HttpRequestMessage(HttpMethod.Get, uri.ToString())) 708using (var request = new HttpRequestMessage(HttpMethod.Get, uri.ToString())) 758using (var request = new HttpRequestMessage(HttpMethod.Get, uri.ToString())) 831using (var request = new HttpRequestMessage(HttpMethod.Get, uri.ToString()))
Microsoft.Build.Tasks.UnitTests (8)
DownloadFile_Tests.cs (8)
41RequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://largedownload/foo.txt") 70RequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://success/foo.txt") 104RequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://success/foo.txt") 149RequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://success/foo.txt") 222RequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://success/foo.txt") 296RequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://success/foo.txt") 332RequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://success/foo.txt") 355RequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://unknown/")
Microsoft.DotNet.Build.Tasks.Feed (1)
src\CreateAzureDevOpsFeed.cs (1)
148using HttpRequestMessage createFeedMessage = new HttpRequestMessage(HttpMethod.Post, $"{AzureDevOpsProject}/_apis/packaging/feeds");
Microsoft.DotNet.Deployment.Tasks.Links (1)
Microsoft.DotNet.Git.IssueManager (1)
Clients\AzureDevOpsClient.cs (1)
34HttpRequestMessage getMessage = new HttpRequestMessage(HttpMethod.Get, $"_apis/git/repositories/{repoName}/commits?searchCriteria.ids={commit}");
Microsoft.DotNet.Helix.Sdk (8)
CheckAzurePipelinesTestResults.cs (4)
58using var req = new HttpRequestMessage( 112using var req = new HttpRequestMessage( 164using (var req = new HttpRequestMessage( 208using (var req = new HttpRequestMessage(
CreateFailedTestsForFailedWorkItems.cs (1)
39new HttpRequestMessage(
FindDotNetCliPackage.cs (1)
266using var req = new HttpRequestMessage(HttpMethod.Head, uri);
StartAzurePipelinesTestRun.cs (1)
34new HttpRequestMessage(
StopAzurePipelinesTestRun.cs (1)
29new HttpRequestMessage(
Microsoft.DotNet.Helix.Sdk.Tests (16)
FindDotNetCliPackageTests.cs (16)
27RequestMessage = new HttpRequestMessage(HttpMethod.Get, "https://dotnetcli.blob.core.windows.net/dotnet/Runtime/6.0.102/runtime-productVersion.txt"), 32RequestMessage= new HttpRequestMessage(HttpMethod.Head, "https://dotnetcli.blob.core.windows.net/dotnet/Runtime/6.0.102/dotnet-runtime-6.0.102-win-x86.zip"), 37RequestMessage = new HttpRequestMessage(HttpMethod.Get, "https://dotnetbuilds.blob.core.windows.net/public/Runtime/6.0.102/runtime-productVersion.txt"), 42RequestMessage = new HttpRequestMessage(HttpMethod.Head, "https://dotnetbuilds.blob.core.windows.net/public/Runtime/6.0.102/dotnet-runtime-6.0.102-win-x86.zip"), 75RequestMessage = new HttpRequestMessage(HttpMethod.Get, "https://fakeazureaccount.blob.core.windows.net/Runtime/6.0.102/runtime-productVersion.txt"), 80RequestMessage = new HttpRequestMessage(HttpMethod.Head, "https://fakeazureaccount.blob.core.windows.net/Runtime/6.0.102/dotnet-runtime-6.0.102-win-x86.zip"), 125RequestMessage = new HttpRequestMessage(HttpMethod.Get, "https://fakeazureaccount.blob.core.windows.net/Runtime/6.0.102/runtime-productVersion.txt"), 131RequestMessage = new HttpRequestMessage(HttpMethod.Head, "https://fakeazureaccount.blob.core.windows.net/Runtime/6.0.102/dotnet-runtime-6.0.102-win-x86.zip"), 178RequestMessage = new HttpRequestMessage(HttpMethod.Get, "https://dotnetcli.blob.core.windows.net/dotnet/Runtime/6.0.102/runtime-productVersion.txt"), 183RequestMessage= new HttpRequestMessage(HttpMethod.Head, "https://dotnetcli.blob.core.windows.net/dotnet/Runtime/6.0.102/dotnet-runtime-6.0.102-win-x86.zip"), 188RequestMessage = new HttpRequestMessage(HttpMethod.Get, "https://dotnetbuilds.blob.core.windows.net/public/Runtime/6.0.102/runtime-productVersion.txt"), 193RequestMessage = new HttpRequestMessage(HttpMethod.Head, "https://dotnetbuilds.blob.core.windows.net/public/Runtime/6.0.102/dotnet-runtime-6.0.102-win-x86.zip"), 244RequestMessage = new HttpRequestMessage(HttpMethod.Get, "https://dotnetcli.blob.core.windows.net/dotnet/Runtime/6.0.102/runtime-productVersion.txt"), 249RequestMessage = new HttpRequestMessage(HttpMethod.Head, "https://dotnetcli.blob.core.windows.net/dotnet/Runtime/6.0.102/dotnet-runtime-6.0.102-win-x86.zip"), 254RequestMessage = new HttpRequestMessage(HttpMethod.Get, "https://dotnetbuilds.blob.core.windows.net/public/Runtime/6.0.102/runtime-productVersion.txt"), 259RequestMessage = new HttpRequestMessage(HttpMethod.Head, "https://dotnetbuilds.blob.core.windows.net/public/Runtime/6.0.102/dotnet-runtime-6.0.102-win-x86.zip"),
Microsoft.DotNet.Internal.SymbolHelper (4)
SymbolPromotionHelper.cs (3)
146using HttpRequestMessage registerRequest = new(HttpMethod.Post, url) 200using HttpRequestMessage statusRequest = new(HttpMethod.Get, requestSpecificEndpoint) 263using HttpRequestMessage statusRequest = new(HttpMethod.Patch, requestSpecificEndpoint)
SymbolUploadHelperFactory.cs (1)
150using HttpRequestMessage getToolRequest = new(HttpMethod.Get, downloadUri) { Headers = { Accept = { new ("application/zip") } } };
Microsoft.DotNet.VersionTools (4)
Automation\GitHubApi\GitHubClient.cs (3)
209HttpRequestMessage request = new HttpRequestMessage(new HttpMethod("PATCH"), url); 372HttpRequestMessage request = new HttpRequestMessage(new HttpMethod("POST"), url) 396HttpRequestMessage request = new HttpRequestMessage(new HttpMethod("PATCH"), url)
Automation\VstsApi\VstsAdapterClient.cs (1)
169var request = new HttpRequestMessage(new HttpMethod("PATCH"), url)
Microsoft.Extensions.Http.Diagnostics.PerformanceTests (4)
Benchmarks\HeadersReaderBenchmark.cs (1)
35Request = new HttpRequestMessage(HttpMethod.Post, "https://www.microsoft.com");
Benchmarks\HugeHttpCLientLoggingBenchmark.cs (1)
17private static HttpRequestMessage Request => new(HttpMethod.Post, "https://www.microsoft.com");
Benchmarks\MediumHttpClientLoggingBenchmark.cs (1)
17private static HttpRequestMessage Request => new(HttpMethod.Post, "https://www.microsoft.com");
Benchmarks\SmallHttpClientLoggingBenchmark.cs (1)
17private static HttpRequestMessage Request => new(HttpMethod.Post, "https://www.microsoft.com");
Microsoft.Extensions.Http.Diagnostics.Tests (51)
Latency\Internal\HttpLatencyTelemetryHandlerTest.cs (1)
57using var req = new HttpRequestMessage
Logging\AcceptanceTests.cs (12)
107using var httpRequestMessage = new HttpRequestMessage 162using var httpRequestMessage = new HttpRequestMessage 178using var httpRequestMessage2 = new HttpRequestMessage 243using var httpRequestMessage = new HttpRequestMessage 265using var httpRequestMessage2 = new HttpRequestMessage 308using var httpRequestMessage = new HttpRequestMessage 355using var httpRequestMessage = new HttpRequestMessage 420using var httpRequestMessage = new HttpRequestMessage 591using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, _unreachableRequestUri); 617using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, _unreachableRequestUri); 640using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, _unreachableRequestUri); 679using var httpRequestMessage = new HttpRequestMessage
Logging\HttpClientLoggerTest.cs (15)
83using var httpRequestMessage = new HttpRequestMessage 121using var httpRequestMessage = new HttpRequestMessage 183using var httpRequestMessage = new HttpRequestMessage 279using var httpRequestMessage = new HttpRequestMessage 384using var httpRequestMessage = new HttpRequestMessage 480using var httpRequestMessage = new HttpRequestMessage 595using var httpRequestMessage = new HttpRequestMessage 687using var httpRequestMessage = new HttpRequestMessage 730using var httpRequestMessage = new HttpRequestMessage 768using var httpRequestMessage = new HttpRequestMessage 812using var httpRequestMessage = new HttpRequestMessage 862using var httpRequestMessage = new HttpRequestMessage 957using var httpRequestMessage = new HttpRequestMessage 982using var httpRequestMessage = new HttpRequestMessage(); 1001using var httpRequestMessage = new HttpRequestMessage();
Logging\HttpHeadersReaderTest.cs (4)
23using var httpRequest = new HttpRequestMessage(); 41using var httpRequest = new HttpRequestMessage(); 136using var httpRequest = new HttpRequestMessage { Content = requestContent }; 177using var httpRequest = new HttpRequestMessage();
Logging\HttpRequestBodyReaderTest.cs (9)
39using var httpRequest = new HttpRequestMessage 59using var httpRequest = new HttpRequestMessage 83using var httpRequest = new HttpRequestMessage 104using var httpRequest = new HttpRequestMessage 132using var httpRequest = new HttpRequestMessage 156using var httpRequest = new HttpRequestMessage 183using var httpRequest = new HttpRequestMessage 209using var httpRequest = new HttpRequestMessage 230using var httpRequest = new HttpRequestMessage
Logging\HttpRequestReaderTest.cs (8)
80using var httpRequestMessage = new HttpRequestMessage 143using var httpRequestMessage = new HttpRequestMessage 206using var httpRequestMessage = new HttpRequestMessage 281using var httpRequestMessage = new HttpRequestMessage 353using var httpRequestMessage = new HttpRequestMessage 411using var httpRequestMessage = new HttpRequestMessage 482using var httpRequestMessage = new HttpRequestMessage 549using var httpRequestMessage = new HttpRequestMessage
Telemetry\DownstreamDependencyMetadataManagerTests.cs (2)
48using var requestMessage = new HttpRequestMessage 68using var requestMessage = new HttpRequestMessage
Microsoft.Extensions.Http.Polly.Tests (30)
DependencyInjection\PollyHttpClientBuilderExtensionsTest.cs (14)
67var response = await client.SendAsync(new HttpRequestMessage()); 102var response = await client.SendAsync(new HttpRequestMessage()); 108await Assert.ThrowsAsync<OverflowException>(() => client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "/throw"))); 140var response = await client.SendAsync(new HttpRequestMessage()); 146await Assert.ThrowsAsync<OverflowException>(() => client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "/throw"))); 181var response = await client.SendAsync(new HttpRequestMessage()); 225var response = await client.SendAsync(new HttpRequestMessage()); 231await Assert.ThrowsAsync<OverflowException>(() => client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "/throw"))); 278var response = await client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "/")); 323var response = await client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "/")); 366var request = new HttpRequestMessage(HttpMethod.Get, "http://host1/Service1/"); 375request = new HttpRequestMessage(HttpMethod.Get, "http://host1/Service1/"); 384request = new HttpRequestMessage(HttpMethod.Get, "http://host2/Service1/"); 437var response = await client.SendAsync(new HttpRequestMessage());
HttpRequestMessageExtensionsTest.cs (5)
16var request = new HttpRequestMessage(); 35var request = new HttpRequestMessage(); 48var request = new HttpRequestMessage(); 66var request = new HttpRequestMessage(); 87var request = new HttpRequestMessage();
PolicyHttpMessageHandlerTest.cs (11)
49var response = await handler.SendAsync(new HttpRequestMessage(), CancellationToken.None); 64var expectedRequest = new HttpRequestMessage(); 142var response = await invoke.SendAsync(new HttpRequestMessage(), CancellationToken.None); 194var response = await invoke.SendAsync(new HttpRequestMessage(), CancellationToken.None); 216await handler.SendAsync(new HttpRequestMessage(), CancellationToken.None); 264var response = await handler.SendAsync(new HttpRequestMessage(), CancellationToken.None); 288var request = new HttpRequestMessage(); 318var request = new HttpRequestMessage(); 339var request = new HttpRequestMessage(); 365var request = new HttpRequestMessage(); 402var request = new HttpRequestMessage();
Microsoft.Extensions.Http.Resilience (2)
Internal\RequestMessageSnapshot.cs (1)
34var clone = new HttpRequestMessage(_method!, _requestUri)
Resilience\ResilienceHttpClientBuilderExtensions.Resilience.cs (1)
105using var request = new HttpRequestMessage(HttpMethod.Get, "https://localhost:123");
Microsoft.Extensions.Http.Resilience.PerformanceTests (4)
HedgingBenchmark.cs (1)
16private static HttpRequestMessage Request => new(HttpMethod.Post, _uri);
HttpResilienceBenchmark.cs (1)
27var request = new HttpRequestMessage(HttpMethod.Post, _uri);
RetryBenchmark.cs (1)
25private static HttpRequestMessage Request => new(HttpMethod.Post, _uri);
StandardResilienceBenchmark.cs (1)
25private static HttpRequestMessage Request => new(HttpMethod.Post, _uri);
Microsoft.Extensions.Http.Resilience.Tests (31)
Hedging\HedgingTests.cs (9)
83using var request = new HttpRequestMessage(HttpMethod.Get, "https://to-be-replaced:1234/some-path?query"); 123using var request = new HttpRequestMessage(HttpMethod.Get, "https://to-be-replaced:1234/some-path?query"); 142using var request = new HttpRequestMessage(HttpMethod.Get, "https://to-be-replaced:1234/some-path?query"); 164using var request = new HttpRequestMessage(HttpMethod.Get, "https://to-be-replaced:1234/some-path?query"); 189using var request = new HttpRequestMessage(HttpMethod.Get, "https://to-be-replaced:1234/some-path?query"); 213using var request = new HttpRequestMessage(HttpMethod.Get, "https://to-be-replaced:1234/some-path?query"); 237using var request = new HttpRequestMessage(HttpMethod.Get, "https://to-be-replaced:1234/some-path?query"); 265using var request = new HttpRequestMessage(HttpMethod.Get, "https://to-be-replaced:1234/some-path?query"); 289using var request = new HttpRequestMessage(HttpMethod.Get, "https://to-be-replaced:1234/some-path?query");
Hedging\StandardHedgingTests.cs (6)
121using var request = new HttpRequestMessage(); 223using var request = new HttpRequestMessage(HttpMethod.Get, "https://key:80/discarded"); 256using var firstRequest = new HttpRequestMessage(HttpMethod.Get, "https://to-be-replaced:1234/some-path?query"); 263using var secondRequest = new HttpRequestMessage(HttpMethod.Get, "https://to-be-replaced:1234/some-path?query"); 291using var request = new HttpRequestMessage(HttpMethod.Get, "https://some-endpoint:1234/some-path?query"); 338using var request = new HttpRequestMessage(HttpMethod.Get, $"https://{FailingEndpoint}:3000");
Internal\RequestMessageSnapshotStrategyTests.cs (1)
22using var request = new HttpRequestMessage();
Resilience\HttpClientBuilderExtensionsTests.BySelector.cs (3)
38using var request = new HttpRequestMessage(HttpMethod.Head, url); 53using var request = new HttpRequestMessage(); 84using var request = new HttpRequestMessage(HttpMethod.Head, url);
Resilience\HttpClientBuilderExtensionsTests.Standard.cs (1)
41using var request = new HttpRequestMessage(HttpMethod.Get, url);
Resilience\HttpResilienceContextExtensionsTests.cs (3)
42using var request = new HttpRequestMessage(); 52using var request = new HttpRequestMessage(); 71using var request = new HttpRequestMessage();
Resilience\RequestMessageSnapshotTests.cs (2)
21var initialRequest = new HttpRequestMessage 55var initialRequest = new HttpRequestMessage
Resilience\ResilienceHandlerTest.cs (5)
30using var request = new HttpRequestMessage(); 68using var request = new HttpRequestMessage(); 100using var request = new HttpRequestMessage(); 131using var request = new HttpRequestMessage(); 155using var request = new HttpRequestMessage();
Routing\RoutingResilienceStrategyTests.cs (1)
37using var request = new HttpRequestMessage();
Microsoft.Extensions.Logging.AzureAppServices (2)
BlobAppendReferenceWrapper.cs (2)
35var message = new HttpRequestMessage(HttpMethod.Put, _appendUri) 49var message = new HttpRequestMessage(HttpMethod.Put, _fullUri)
Microsoft.Extensions.ML (1)
ModelLoaders\UriModelLoader.cs (1)
109var headRequest = new HttpRequestMessage(HttpMethod.Head, uri);
Microsoft.Extensions.ServiceDiscovery.Tests (1)
ServiceEndpointResolverTests.cs (1)
198var httpRequest = new HttpRequestMessage(HttpMethod.Get, "http://basket");
Negotiate.Client (3)
Controllers\AuthTestController.cs (3)
117result = await client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "auth/Unrestricted") { Version = GetProtocolVersion(protocol2) }); 150result = await client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "auth/Unrestricted") { Version = GetProtocolVersion(protocol2) }); 183result = await client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "auth/Authorized") { Version = GetProtocolVersion(protocol2) });
ServerComparison.FunctionalTests (6)
ResponseCompressionTests.cs (2)
167var request = new HttpRequestMessage(HttpMethod.Get, "NoAppCompression"); 199var request = new HttpRequestMessage(HttpMethod.Get, url);
ResponseTests.cs (4)
129var requestMessage = new HttpRequestMessage(HttpMethod.Get, "contentlength") 174var requestMessage = new HttpRequestMessage(HttpMethod.Get, "connectionclose") 199var requestMessage = new HttpRequestMessage(HttpMethod.Get, "chunked") 224var requestMessage = new HttpRequestMessage(HttpMethod.Get, "manuallychunked")
SocialSample (2)
Startup.cs (2)
137var request = new HttpRequestMessage(HttpMethod.Get, context.Options.UserInformationEndpoint); 198var request = new HttpRequestMessage(HttpMethod.Get, context.Options.UserInformationEndpoint);
Stress.AppHost (1)
ResourceBuilderExtensions.cs (1)
63var request = new HttpRequestMessage(method, uri);
System.Net.Http (2)
System\Net\Http\HttpClient.cs (1)
821new HttpRequestMessage(method, uri) { Version = _defaultRequestVersion, VersionPolicy = _defaultVersionPolicy };
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.cs (1)
784HttpRequestMessage tunnelRequest = new HttpRequestMessage(HttpMethod.Connect, _proxyUri);
System.Net.Requests (1)
System\Net\HttpWebRequest.cs (1)
1175_sendRequestMessage = new HttpRequestMessage(HttpMethod.Parse(_originVerb), _requestUri);
System.Net.WebSockets.Client (2)
System\Net\WebSockets\WebSocketHandle.Managed.cs (2)
87request = new HttpRequestMessage(HttpMethod.Connect, uri) { Version = HttpVersion.Version20 }; 92request = new HttpRequestMessage(HttpMethod.Get, uri) { Version = HttpVersion.Version11 };
Templates.Blazor.Tests (3)
BlazorWebTemplateTest.cs (1)
85var request = new HttpRequestMessage(HttpMethod.Get, new Uri(aspNetProcess.ListeningUri, "/_framework/blazor.boot.json"));
src\ProjectTemplates\Shared\AspNetProcess.cs (2)
136var request = new HttpRequestMessage( 257var request = new HttpRequestMessage(
Templates.Blazor.WebAssembly.Auth.Tests (2)
src\ProjectTemplates\Shared\AspNetProcess.cs (2)
136var request = new HttpRequestMessage( 257var request = new HttpRequestMessage(
Templates.Blazor.WebAssembly.Tests (2)
src\ProjectTemplates\Shared\AspNetProcess.cs (2)
136var request = new HttpRequestMessage( 257var request = new HttpRequestMessage(
Templates.Mvc.Tests (2)
src\ProjectTemplates\Shared\AspNetProcess.cs (2)
136var request = new HttpRequestMessage( 257var request = new HttpRequestMessage(
Templates.Tests (2)
src\ProjectTemplates\Shared\AspNetProcess.cs (2)
136var request = new HttpRequestMessage( 257var request = new HttpRequestMessage(
1459 references to HttpRequestMessage
Aspire.Dashboard.Tests (12)
Integration\OtlpCorsHttpServiceTests.cs (5)
30var preflightRequest = new HttpRequestMessage(HttpMethod.Options, "/v1/logs"); 55var preflightRequest1 = new HttpRequestMessage(HttpMethod.Options, "/v1/logs"); 69var preflightRequest2 = new HttpRequestMessage(HttpMethod.Options, "/v1/logs"); 95var preflightRequest = new HttpRequestMessage(HttpMethod.Options, "/v1/logs"); 123var preflightRequest = new HttpRequestMessage(HttpMethod.Options, "/v1/logs");
Integration\OtlpHttpServiceTests.cs (3)
140var requestMessage = new HttpRequestMessage(HttpMethod.Post, "/v1/logs"); 168var requestMessage = new HttpRequestMessage(HttpMethod.Post, "/v1/logs"); 260var requestMessage = new HttpRequestMessage(new HttpMethod(method), "/v1/logs");
Integration\ResponseCompressionTests.cs (2)
26var request = new HttpRequestMessage(HttpMethod.Get, DashboardUrls.StructuredLogsBasePath); 48var request = new HttpRequestMessage(HttpMethod.Get, path);
Integration\StartupTests.cs (2)
298var request = new HttpRequestMessage(HttpMethod.Get, "/"); 399var request = new HttpRequestMessage(HttpMethod.Get, "/");
Aspire.Hosting (1)
Dcp\DcpKubernetesClient.cs (1)
72var httpRequest = httpResponse.RequestMessage;
Aspire.Hosting.Redis (1)
RedisBuilderExtensions.cs (1)
282var deleteRequest = new HttpRequestMessage(HttpMethod.Delete, databasesPath)
AuthSamples.FunctionalTests (1)
HttpClientExtensions.cs (1)
47var submision = new HttpRequestMessage(new HttpMethod(submit.Method.ToString()), target)
Binding.Http.IntegrationTests (2)
HttpBindingTestHelpers.cs (2)
30public Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> OnSendingAsync { get; set; } 45protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Binding.ReliableSession.IntegrationTests (2)
src\System.Private.ServiceModel\tests\Scenarios\Binding\Http\HttpBindingTestHelpers.cs (2)
30public Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> OnSendingAsync { get; set; } 45protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
ClientSample (1)
LoggingMessageHandler.cs (1)
25protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Diagnostics.FunctionalTests (13)
DatabaseErrorPageSampleTest.cs (1)
25var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/");
DeveloperExceptionPageSampleTest.cs (2)
26var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/"); 41var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/");
ExceptionHandlerSampleTest.cs (1)
22var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/throw");
MiddlewareAnalysisSampleTest.cs (1)
22var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/");
ProblemDetailsExceptionHandlerSampleTest.cs (2)
26var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/throw"); 43var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/throw2/conflict");
StatusCodeSampleTest.cs (5)
27var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/errors/417"); 43var request = new HttpRequestMessage(HttpMethod.Get, $"http://localhost/?statuscode={httpStatusCode}"); 60var request = new HttpRequestMessage(HttpMethod.Get, $"http://localhost/?statuscode={httpStatusCode}"); 81var request = new HttpRequestMessage(HttpMethod.Get, $"http://localhost?statuscode={httpStatusCode}"); 99var request = new HttpRequestMessage(HttpMethod.Get, $"http://localhost?statuscode={httpStatusCode}");
WelcomePageSampleTest.cs (1)
21var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/");
dotnet-svcutil-lib (35)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpChannelFactory.cs (8)
590internal HttpRequestMessage GetHttpRequestMessage(Uri via) 594var requestMessage = new HttpRequestMessage(HttpMethod.Post, httpRequestUri); 850internal HttpRequestMessage GetHttpRequestMessage(Uri via) 855internal virtual void OnHttpRequestCompleted(HttpRequestMessage request) 878private HttpRequestMessage _httpRequestMessage; 986var httpRequestMessageSnapshot = _httpRequestMessage; 1211private void TryCompleteHttpRequest(HttpRequestMessage request) 1235HttpRequestMessage headHttpRequestMessage = new HttpRequestMessage()
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpChannelHelpers.cs (2)
112public static HttpResponseMessage ProcessGetResponseWebException(HttpRequestException requestException, HttpRequestMessage request, HttpAbortReason abortReason) 126public static Exception ConvertHttpRequestException(HttpRequestException exception, HttpRequestMessage request, HttpAbortReason abortReason)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpRequestMessageExtensionMethods.cs (4)
23internal static void CopyPropertiesFromMessage(this HttpRequestMessage httpRequestMessage, Message message) 68public static bool CreateContentIfNull(this HttpRequestMessage httpRequestMessage) 81internal static void MergeWebHeaderCollection(this HttpRequestMessage requestMessage, WebHeaderCollection headersToMerge) 102internal static WebHeaderCollection ToWebHeaderCollection(this HttpRequestMessage httpRequest)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpRequestMessageProperty.cs (6)
31internal HttpRequestMessageProperty(HttpRequestMessage httpRequestMessage) 128public HttpRequestMessage HttpRequestMessage 141internal static HttpRequestMessage GetHttpRequestMessageFromMessage(Message message) 143HttpRequestMessage httpRequestMessage = null; 264public HttpRequestMessageBackedProperty(HttpRequestMessage httpRequestMessage) 271public HttpRequestMessage HttpRequestMessage { get; private set; }
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpResponseMessageExtensionMethods.cs (1)
20HttpRequestMessage request = httpResponseMessage.RequestMessage;
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpResponseMessageHelper.cs (1)
20private readonly HttpRequestMessage _httpRequestMessage;
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpsChannelFactory.cs (3)
23private Func<HttpRequestMessage, X509Certificate2, X509Chain, SslPolicyErrors, bool> _remoteCertificateValidationCallback; 186private bool RemoteCertificateValidationCallback(HttpRequestMessage sender, X509Certificate2 certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) 312internal override void OnHttpRequestCompleted(HttpRequestMessage request)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ServiceModelHttpMessageHandler.CoreClr.cs (1)
72public Func<HttpRequestMessage, X509Certificate2, X509Chain, SslPolicyErrors, bool>
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\TransportSecurityHelpers.cs (9)
339private static Dictionary<HttpRequestMessage, string> s_serverCertMap = new Dictionary<HttpRequestMessage, string>(); 341public static void AddServerCertMapping(HttpRequestMessage request, EndpointAddress to) 355private static void AddServerCertMapping(HttpRequestMessage request, string thumbprint) 373private static Func<HttpRequestMessage, X509Certificate2, X509Chain, SslPolicyErrors, bool> ChainValidator(Func<HttpRequestMessage, X509Certificate2, X509Chain, SslPolicyErrors, bool> previousValidator) 380Func<HttpRequestMessage, X509Certificate2, X509Chain, SslPolicyErrors, bool> chained = 393private static bool OnValidateServerCertificate(HttpRequestMessage request, X509Certificate2 certificate, X509Chain chain, 419public static void RemoveServerCertMapping(HttpRequestMessage request)
GenerateRulesMissingDocumentation (1)
Program.cs (1)
113var request = new HttpRequestMessage(HttpMethod.Head, uri);
HttpStress (11)
Program.cs (11)
122using (var req = new HttpRequestMessage(HttpMethod.Get, serverUri + path) { Version = httpVersion }) 174using (var req = new HttpRequestMessage(HttpMethod.Get, serverUri) { Version = httpVersion }) 203using (var req = new HttpRequestMessage(HttpMethod.Get, serverUri + "/headers") { Version = httpVersion }) 215using (var req = new HttpRequestMessage(HttpMethod.Get, serverUri) { Version = httpVersion }) 243using (var req = new HttpRequestMessage(HttpMethod.Post, serverUri) { Version = httpVersion, Content = new StringDuplexContent(content) }) 257using (var req = new HttpRequestMessage(HttpMethod.Post, serverUri + "/duplex") { Version = httpVersion, Content = new StringDuplexContent(content) }) 271using (var req = new HttpRequestMessage(HttpMethod.Post, serverUri + "/duplexSlow") { Version = httpVersion, Content = new ByteAtATimeNoLengthContent(Encoding.ASCII.GetBytes(content)) }) 285using (var req = new HttpRequestMessage(HttpMethod.Post, serverUri) { Version = httpVersion, Content = new StringContent(content) }) 302using (var req = new HttpRequestMessage(HttpMethod.Post, serverUri) { Version = httpVersion, Content = new StringContent(content) }) 325using (var req = new HttpRequestMessage(HttpMethod.Head, serverUri) { Version = httpVersion }) 347using (var req = new HttpRequestMessage(HttpMethod.Put, serverUri) { Version = httpVersion, Content = new StringContent(content) })
IIS.FunctionalTests (7)
Http3Tests.cs (1)
67var request = new HttpRequestMessage(HttpMethod.Get, address);
src\Servers\IIS\IIS\test\Common.FunctionalTests\BasicAuthTests.cs (1)
60var request = new HttpRequestMessage(HttpMethod.Get, "/Auth");
src\Servers\IIS\IIS\test\Common.FunctionalTests\Latin1Tests.cs (2)
48var requestMessage = new HttpRequestMessage(HttpMethod.Get, $"{deploymentResult.ApplicationBaseUri}Latin1"); 66var requestMessage = new HttpRequestMessage(HttpMethod.Get, $"{deploymentResult.ApplicationBaseUri}InvalidCharacter");
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestResponseTests.cs (3)
127var request = new HttpRequestMessage(HttpMethod.Get, "/CompressedData"); 145var request = new HttpRequestMessage(HttpMethod.Get, "/CompressedData"); 582var request = new HttpRequestMessage(new HttpMethod(method), _fixture.Client.BaseAddress + $"SetCustomErorCode?code={code}");
IISExpress.FunctionalTests (6)
src\Servers\IIS\IIS\test\Common.FunctionalTests\BasicAuthTests.cs (1)
60var request = new HttpRequestMessage(HttpMethod.Get, "/Auth");
src\Servers\IIS\IIS\test\Common.FunctionalTests\Latin1Tests.cs (2)
48var requestMessage = new HttpRequestMessage(HttpMethod.Get, $"{deploymentResult.ApplicationBaseUri}Latin1"); 66var requestMessage = new HttpRequestMessage(HttpMethod.Get, $"{deploymentResult.ApplicationBaseUri}InvalidCharacter");
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestResponseTests.cs (3)
127var request = new HttpRequestMessage(HttpMethod.Get, "/CompressedData"); 145var request = new HttpRequestMessage(HttpMethod.Get, "/CompressedData"); 582var request = new HttpRequestMessage(new HttpMethod(method), _fixture.Client.BaseAddress + $"SetCustomErorCode?code={code}");
InMemory.FunctionalTests (7)
EventSourceTests.cs (1)
188using var httpRequestMessage = new HttpRequestMessage()
Http2\Http2EndToEndTests.cs (1)
65using var httpRequestMessage = new HttpRequestMessage()
KestrelMetricsTests.cs (5)
567var httpRequestMessage = new HttpRequestMessage() 646var httpRequestMessage = new HttpRequestMessage() 724using var httpRequestMessage = new HttpRequestMessage() 805using var httpRequestMessage = new HttpRequestMessage() 893using var httpRequestMessage = new HttpRequestMessage()
Interop.FunctionalTests (64)
Http2\Http2RequestTests.cs (4)
126var request1 = new HttpRequestMessage(HttpMethod.Get, $"https://[::1]:{host.GetPort()}/"); 183var request1 = new HttpRequestMessage(HttpMethod.Get, $"http://127.0.0.1:{host.GetPort()}/"); 209var request = new HttpRequestMessage(HttpMethod.Get, $"http://127.0.0.1:{host.GetPort()}/"); 292var request = new HttpRequestMessage(HttpMethod.Get, $"http://127.0.0.1:{host.GetPort()}/");
Http2WebSocketInteropTests.cs (1)
197protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Http3\Http3RequestTests.cs (38)
89var request1 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 148var request = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 250var request = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 293var request = new HttpRequestMessage(HttpMethod.Post, $"https://127.0.0.1:{host.GetPort()}/"); 374var request = new HttpRequestMessage(HttpMethod.Post, $"https://127.0.0.1:{host.GetPort()}/"); 417var request = new HttpRequestMessage(HttpMethod.Post, $"https://127.0.0.1:{host.GetPort()}/"); 488var request = new HttpRequestMessage(HttpMethod.Post, $"https://127.0.0.1:{host.GetPort()}/"); 559var request = new HttpRequestMessage(HttpMethod.Post, $"https://127.0.0.1:{host.GetPort()}/"); 619var request = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 675var request = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 724var request = new HttpRequestMessage(HttpMethod.Post, $"https://127.0.0.1:{host.GetPort()}/"); 815var request = new HttpRequestMessage(HttpMethod.Get, address); 851var request1 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 862var request2 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 911var request1 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 924var request2 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 940var request3 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 1013var request = new HttpRequestMessage(HttpMethod.Post, $"https://127.0.0.1:{host.GetPort()}/"); 1110var request = new HttpRequestMessage(HttpMethod.Post, $"https://127.0.0.1:{host.GetPort()}/"); 1257var request = new HttpRequestMessage(HttpMethod.Post, $"https://127.0.0.1:{host.GetPort()}/"); 1316var request = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 1369var request = new HttpRequestMessage(HttpMethod.Post, $"https://127.0.0.1:{host.GetPort()}/"); 1422var request1 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 1432var request2 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 1488var request1 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 1499var request2 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 1541var request1 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 1559var request2 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 1603var request1 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{port}/"); 1663var request1 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{port}/"); 1719var request1 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{port}/"); 1837private HttpRequestMessage CreateHttp3Request(HttpMethod method, string url) 1839var request = new HttpRequestMessage(method, url); 1885var request1 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{port}/"); 1962var request1 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{port}/"); 2038var request = new HttpRequestMessage(HttpMethod.Post, $"https://127.0.0.1:{host.GetPort()}/"); 2138var request = new HttpRequestMessage(HttpMethod.Post, $"https://127.0.0.1:{host.GetPort()}/"); 2192var request = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/");
Http3\Http3TlsTests.cs (7)
56var request = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 103var request = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 145var request = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 194var request = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 244var request = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 322var request = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 473var request = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/");
HttpClientHttp2InteropTests.cs (14)
91using var request = CreateRequestMessage(HttpMethod.Post, url, new BulkContent()); 185using var request = CreateRequestMessage(HttpMethod.Post, url, new BulkContent()); 298var request = CreateRequestMessage(HttpMethod.Post, url, streamingContent); 375var request = CreateRequestMessage(HttpMethod.Post, url, streamingContent); 435var request = CreateRequestMessage(HttpMethod.Post, url, streamingContent); 734var request = CreateRequestMessage(HttpMethod.Post, url, streamingContent); 791var request = CreateRequestMessage(HttpMethod.Post, url, streamingContent); 843var request = CreateRequestMessage(HttpMethod.Post, url, streamingContent); 888var request = CreateRequestMessage(HttpMethod.Post, url, streamingContent); 1056var request = CreateRequestMessage(HttpMethod.Get, url, content: null); 1165var request = CreateRequestMessage(HttpMethod.Get, url, content: null); 1364var request = CreateRequestMessage(HttpMethod.Get, url, content: null); 1566var request = CreateRequestMessage(HttpMethod.Get, url, content: null); 1696private static HttpRequestMessage CreateRequestMessage(HttpMethod method, string url, HttpContent content)
Keycloak.Web (1)
AuthorizationHandler.cs (1)
8protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Microsoft.Analyzers.Local.Tests (1)
ApiLifecycle\ApiLifecycleAnalyzerTest.cs (1)
91Assembly.GetAssembly(typeof(HttpRequestMessage))!,
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)
13public HttpRequestMessage RequestMessage { get; set; }
Microsoft.Arcade.Test.Common (1)
FakeHttpClient.cs (1)
36protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Microsoft.AspNetCore.Authentication.Google (1)
GoogleHandler.cs (1)
47var request = new HttpRequestMessage(HttpMethod.Get, Options.UserInformationEndpoint);
Microsoft.AspNetCore.Authentication.MicrosoftAccount (1)
MicrosoftAccountHandler.cs (1)
43var request = new HttpRequestMessage(HttpMethod.Get, Options.UserInformationEndpoint);
Microsoft.AspNetCore.Authentication.OAuth (1)
OAuthHandler.cs (1)
218var requestMessage = new HttpRequestMessage(HttpMethod.Post, Options.TokenEndpoint);
Microsoft.AspNetCore.Authentication.OpenIdConnect (3)
OpenIdConnectHandler.cs (3)
596var requestMessage = new HttpRequestMessage(HttpMethod.Post, parEndpoint); 991var requestMessage = new HttpRequestMessage(HttpMethod.Post, tokenEndpointRequest.TokenEndpoint ?? _configuration?.TokenEndpoint); 1057var requestMessage = new HttpRequestMessage(HttpMethod.Get, userInfoEndpoint);
Microsoft.AspNetCore.Authentication.Test (31)
CookieTests.cs (2)
1905var request = new HttpRequestMessage(HttpMethod.Get, uri); 1936public HttpRequestMessage Request { get; set; }
JwtBearerTests.cs (1)
1250var request = new HttpRequestMessage(HttpMethod.Get, uri);
JwtBearerTests_Handler.cs (1)
1309var request = new HttpRequestMessage(HttpMethod.Get, uri);
OpenIdConnect\OpenIdConnectAuthenticateTests.cs (1)
58var request = new HttpRequestMessage(HttpMethod.Post, "/");
OpenIdConnect\OpenIdConnectChallengeTests.cs (1)
972protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
OpenIdConnect\OpenIdConnectEventTests.cs (1)
1391protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
OpenIdConnect\OpenIdConnectEventTests_Handler.cs (1)
1386protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
OpenIdConnect\TestServerExtensions.cs (1)
22public static async Task<TestTransaction> SendAsync(this TestServer server, HttpRequestMessage request, string cookieHeader)
OpenIdConnect\TestSettings.cs (1)
318protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
OpenIdConnect\TestTransaction.cs (1)
11public HttpRequestMessage Request { get; set; }
TestExtensions.cs (1)
20var request = new HttpRequestMessage(HttpMethod.Get, uri);
TestHttpMessageHandler.cs (2)
10public Func<HttpRequestMessage, HttpResponseMessage> Sender { get; set; } 12protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, System.Threading.CancellationToken cancellationToken)
Transaction.cs (1)
11public HttpRequestMessage Request { get; set; }
TwitterTests.cs (6)
218var request = new HttpRequestMessage(HttpMethod.Get, "/signin-twitter?denied=ABCDEFG"); 268var request = new HttpRequestMessage(HttpMethod.Get, "/signin-twitter?denied=ABCDEFG"); 375var request = new HttpRequestMessage(HttpMethod.Get, "/signin-twitter?denied=ABCDEFG"); 592private HttpResponseMessage BackchannelRequestToken(HttpRequestMessage req) 607private HttpResponseMessage JsonErroredBackchannelRequestToken(HttpRequestMessage req) 622private HttpResponseMessage UnknownContentTypeErroredBackchannelRequestToken(HttpRequestMessage req)
WsFederation\WsFederationTest.cs (5)
126var request = new HttpRequestMessage(HttpMethod.Post, queryItems["wreply"]); 160var request = new HttpRequestMessage(HttpMethod.Get, response.Headers.Location); 177var request = new HttpRequestMessage(HttpMethod.Post, queryItems["wreply"]); 262private void CopyCookies(HttpResponseMessage response, HttpRequestMessage request) 450protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
WsFederation\WsFederationTest_Handler.cs (5)
124var request = new HttpRequestMessage(HttpMethod.Post, queryItems["wreply"]); 158var request = new HttpRequestMessage(HttpMethod.Get, response.Headers.Location); 175var request = new HttpRequestMessage(HttpMethod.Post, queryItems["wreply"]); 260private void CopyCookies(HttpResponseMessage response, HttpRequestMessage request) 446protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Microsoft.AspNetCore.Authentication.Twitter (1)
TwitterHandler.cs (1)
254var request = new HttpRequestMessage(httpMethod, url + queryString);
Microsoft.AspNetCore.Components.WebAssembly (29)
Http\WebAssemblyHttpRequestMessageExtensions.cs (29)
9/// Extension methods for configuring an instance of <see cref="HttpRequestMessage"/> with browser-specific options. 20/// <param name="requestMessage">The <see cref="HttpRequestMessage"/>.</param> 22/// <returns>The <see cref="HttpRequestMessage"/>.</returns> 26public static HttpRequestMessage SetBrowserRequestCredentials(this HttpRequestMessage requestMessage, BrowserRequestCredentials requestCredentials) 44/// <param name="requestMessage">The <see cref="HttpRequestMessage"/>.</param> 46/// <returns>The <see cref="HttpRequestMessage"/>.</returns>\ 50public static HttpRequestMessage SetBrowserRequestCache(this HttpRequestMessage requestMessage, BrowserRequestCache requestCache) 71/// <param name="requestMessage">The <see cref="HttpRequestMessage"/>.</param> 73/// <returns>The <see cref="HttpRequestMessage"/>.</returns>\ 77public static HttpRequestMessage SetBrowserRequestMode(this HttpRequestMessage requestMessage, BrowserRequestMode requestMode) 96/// <param name="requestMessage">The <see cref="HttpRequestMessage"/>.</param> 98/// <returns>The <see cref="HttpRequestMessage"/>.</returns> 102public static HttpRequestMessage SetBrowserRequestIntegrity(this HttpRequestMessage requestMessage, string integrity) 108/// <param name="requestMessage">The <see cref="HttpRequestMessage"/>.</param> 111/// <returns>The <see cref="HttpRequestMessage"/>.</returns> 115public static HttpRequestMessage SetBrowserRequestOption(this HttpRequestMessage requestMessage, string name, object value) 138/// <param name="requestMessage">The <see cref="HttpRequestMessage"/>.</param> 140/// <returns>The <see cref="HttpRequestMessage"/>.</returns> 146public static HttpRequestMessage SetBrowserRequestStreamingEnabled(this HttpRequestMessage requestMessage, bool streamingEnabled) 158/// <param name="requestMessage">The <see cref="HttpRequestMessage"/>.</param> 160/// <returns>The <see cref="HttpRequestMessage"/>.</returns> 165public static HttpRequestMessage SetBrowserResponseStreamingEnabled(this HttpRequestMessage requestMessage, bool streamingEnabled)
Microsoft.AspNetCore.CookiePolicy.Test (2)
TestExtensions.cs (1)
17var request = new HttpRequestMessage(HttpMethod.Get, uri);
Transaction.cs (1)
12public HttpRequestMessage Request { get; set; }
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (2)
Logging\AcceptanceTests.cs (2)
292using var request = new HttpRequestMessage(HttpMethod.Post, "/") 356using var httpMessage = new HttpRequestMessage(HttpMethod.Get, "/");
Microsoft.AspNetCore.Diagnostics.Tests (4)
DeveloperExceptionPageMiddlewareTest.cs (3)
62var request = new HttpRequestMessage(HttpMethod.Get, "/path"); 115var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/test/1"); 174var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/test/1");
ExceptionHandlerMiddlewareTest.cs (1)
68var request = new HttpRequestMessage(HttpMethod.Get, "/path");
Microsoft.AspNetCore.HeaderPropagation (1)
HeaderPropagationMessageHandler.cs (1)
41protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Microsoft.AspNetCore.HeaderPropagation.Tests (7)
HeaderPropagationIntegrationTest.cs (5)
61var request = new HttpRequestMessage(); 109var request = new HttpRequestMessage(); 135var request = new HttpRequestMessage(); 182var request = new HttpRequestMessage(); 232protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
HeaderPropagationMessageHandlerTest.cs (2)
197var request = new HttpRequestMessage(); 264protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request,
Microsoft.AspNetCore.Http.Connections.Client (10)
HttpConnection.cs (1)
472using (var request = new HttpRequestMessage(HttpMethod.Post, uri))
Internal\AccessTokenHttpMessageHandler.cs (2)
22protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 57private static void SetAccessToken(string? accessToken, HttpRequestMessage request)
Internal\Http2HttpMessageHandler.cs (1)
20protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Internal\LoggingHttpMessageHandler.cs (1)
25protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Internal\LongPollingTransport.cs (3)
54var request = new HttpRequestMessage(HttpMethod.Get, url); 154var request = new HttpRequestMessage(HttpMethod.Get, pollUrl); 233var request = new HttpRequestMessage(HttpMethod.Delete, url);
Internal\SendUtils.cs (1)
43var request = new HttpRequestMessage(HttpMethod.Post, sendUrl);
Internal\ServerSentEventsTransport.cs (1)
55var request = new HttpRequestMessage(HttpMethod.Get, url);
Microsoft.AspNetCore.Http.Connections.Tests (1)
HttpConnectionDispatcherTests.cs (1)
3607protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Microsoft.AspNetCore.HttpLogging.Tests (5)
HttpLoggingMiddlewareTests.cs (5)
1776var request = new HttpRequestMessage(HttpMethod.Get, "/attr_restrictedsize") { Content = new ReadOnlyMemoryContent("from request"u8.ToArray()) }; 1802var request = new HttpRequestMessage(HttpMethod.Get, "/attr_responseandrequest"); 1866var request = new HttpRequestMessage(HttpMethod.Get, "/ext_restrictedsize") { Content = new ReadOnlyMemoryContent("from request"u8.ToArray()) }; 1892var request = new HttpRequestMessage(HttpMethod.Get, "/ext_responseandrequest"); 1938var request = new HttpRequestMessage(HttpMethod.Get, "/");
Microsoft.AspNetCore.HttpOverrides.Tests (6)
HttpMethodOverrideMiddlewareTest.cs (6)
39var req = new HttpRequestMessage(HttpMethod.Post, ""); 70var req = new HttpRequestMessage(HttpMethod.Post, ""); 100var req = new HttpRequestMessage(HttpMethod.Get, ""); 133var req = new HttpRequestMessage(HttpMethod.Post, ""); 171var req = new HttpRequestMessage(HttpMethod.Post, ""); 208var req = new HttpRequestMessage(HttpMethod.Post, "");
Microsoft.AspNetCore.HttpsPolicy.Tests (18)
HstsMiddlewareTests.cs (8)
66var request = new HttpRequestMessage(HttpMethod.Get, ""); 112var request = new HttpRequestMessage(HttpMethod.Get, ""); 158var request = new HttpRequestMessage(HttpMethod.Get, ""); 203var request = new HttpRequestMessage(HttpMethod.Get, ""); 258var request = new HttpRequestMessage(HttpMethod.Get, ""); 313var request = new HttpRequestMessage(HttpMethod.Get, ""); 360var request = new HttpRequestMessage(HttpMethod.Get, ""); 406var request = new HttpRequestMessage(HttpMethod.Get, "");
HttpsPolicyTests.cs (1)
65var request = new HttpRequestMessage(HttpMethod.Get, "");
HttpsRedirectionMiddlewareTests.cs (9)
51var request = new HttpRequestMessage(HttpMethod.Get, ""); 106var request = new HttpRequestMessage(HttpMethod.Get, ""); 162var request = new HttpRequestMessage(HttpMethod.Get, ""); 224var request = new HttpRequestMessage(HttpMethod.Get, ""); 264var request = new HttpRequestMessage(HttpMethod.Get, ""); 310var request = new HttpRequestMessage(HttpMethod.Get, ""); 352var request = new HttpRequestMessage(HttpMethod.Get, ""); 400var request = new HttpRequestMessage(HttpMethod.Get, ""); 444var request = new HttpRequestMessage(HttpMethod.Get, "");
Microsoft.AspNetCore.Identity.FunctionalTests (1)
Extensions\HttpClientExtensions.cs (1)
49var submision = new HttpRequestMessage(new HttpMethod(submit.Method.ToString()), target)
Microsoft.AspNetCore.Identity.InMemory.Test (2)
FunctionalTest.cs (2)
430var request = new HttpRequestMessage(HttpMethod.Get, uri); 465public HttpRequestMessage Request { get; set; }
Microsoft.AspNetCore.Identity.Test (1)
RetryHandler.cs (1)
26protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Microsoft.AspNetCore.Localization.FunctionalTests (2)
LocalizationSampleTest.cs (1)
32var request = new HttpRequestMessage(HttpMethod.Get, "My/Resources");
LocalizationTest.cs (1)
111var request = new HttpRequestMessage();
Microsoft.AspNetCore.Mvc.FunctionalTests (355)
AntiforgeryMiddlewareTest.cs (5)
40var request = new HttpRequestMessage(HttpMethod.Post, "/Test/PostWithRequireAntiforgeryToken"); 83var request = new HttpRequestMessage(HttpMethod.Post, "/Test/PostWithRequireAntiforgeryToken"); 124var request = new HttpRequestMessage(HttpMethod.Post, "/Test/PostWithRequireAntiforgeryTokenAndSizeLimit"); 156var request = new HttpRequestMessage(HttpMethod.Post, "/Test/PostWithRequireAntiforgeryTokenAndFormLimit"); 188var request = new HttpRequestMessage(HttpMethod.Post, "/TestWithRequestSizeLimit/PostWithRequireAntiforgeryTokenAndDisableSizeLimit");
AntiforgeryTests.cs (5)
67var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/Antiforgery/Login"); 117var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/Antiforgery/FlushAsyncLogin"); 147var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/Antiforgery/Login"); 190var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/Antiforgery/Login"); 203var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/Antiforgery/LoginWithRedirectResultFilter");
ApiBehaviorTest.cs (2)
103var requestMessage = new HttpRequestMessage(HttpMethod.Post, "/contact") 119var requestMessage = new HttpRequestMessage(HttpMethod.Post, "/contact")
ApiExplorerTest.cs (2)
415var request = new HttpRequestMessage( 438var request = new HttpRequestMessage(
ApplicationModelTest.cs (1)
126var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Home/GetHelloWorld");
AsyncEnumerableTestBase.cs (1)
75var request = new HttpRequestMessage(HttpMethod.Get, "asyncenumerable/getallprojects");
AuthMiddlewareAndFilterTestBase.cs (9)
56var request = new HttpRequestMessage(HttpMethod.Get, action); 74var request = new HttpRequestMessage(HttpMethod.Get, action); 120var request = new HttpRequestMessage(HttpMethod.Get, "PagesHome"); 130var request = new HttpRequestMessage(HttpMethod.Get, "/Authorized/Api"); 145var request = new HttpRequestMessage(HttpMethod.Get, "/Authorized/AllowAnonymous"); 164var request = new HttpRequestMessage(HttpMethod.Get, "/Authorized/Cookie"); 179var request = new HttpRequestMessage(HttpMethod.Get, "/Authorized/AllowAnonymous"); 198var request = new HttpRequestMessage(HttpMethod.Get, "/Authorized/Cookie"); 251var request = new HttpRequestMessage(HttpMethod.Get, url);
AuthMiddlewareUsingRequireAuthTest.cs (2)
47var request = new HttpRequestMessage(HttpMethod.Get, action); 66var request = new HttpRequestMessage(HttpMethod.Get, action);
BasicTests.cs (1)
649var request = new HttpRequestMessage(HttpMethod.Post, "/Home/Product");
ConsumesAttributeTestsBase.cs (8)
47var request = new HttpRequestMessage( 64var request = new HttpRequestMessage( 81var request = new HttpRequestMessage( 99var request = new HttpRequestMessage( 120var request = new HttpRequestMessage( 144var request = new HttpRequestMessage( 165var request = new HttpRequestMessage( 188var request = new HttpRequestMessage(
ContentNegotiationTest.cs (12)
109var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/ContentNegotiation/UserInfo_ProducesWithTypeOnly"); 126var request = new HttpRequestMessage( 151var request = new HttpRequestMessage( 346var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/ContentNegotiation/UserInfo"); 367var request = new HttpRequestMessage(HttpMethod.Get, "FallbackOnTypeBasedMatch/ReturnString"); 385var request = new HttpRequestMessage(HttpMethod.Get, targetUri); 404var request = new HttpRequestMessage(HttpMethod.Post, targetUri); 420var request = new HttpRequestMessage(HttpMethod.Get, targetUri); 435var request = new HttpRequestMessage(HttpMethod.Get, targetUri); 450var request = new HttpRequestMessage(HttpMethod.Get, targetUri); 489var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/ProducesWithMediaTypeSuffixesController/ContactInfo"); 507var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/ProducesWithMediaTypeSuffixesController/ContactInfo");
ControllerFromServicesTests.cs (1)
35var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/constructorinjection?value=14");
CorsTests.cs (1)
16var request = new HttpRequestMessage(new HttpMethod("OPTIONS"), "http://localhost/NonCors/Post");
CorsTestsBase.cs (15)
44var request = new HttpRequestMessage(new HttpMethod(method), "http://localhost/Cors/GetBlogComments"); 64var request = new HttpRequestMessage(new HttpMethod("OPTIONS"), "http://localhost/NonCors/GetOptions"); 80var request = new HttpRequestMessage(new HttpMethod("OPTIONS"), "http://localhost/NonCors/GetOptions"); 98var request = new HttpRequestMessage(new HttpMethod("OPTIONS"), "http://localhost/NonCors/Post"); 117var request = new HttpRequestMessage( 154var request = new HttpRequestMessage( 186var request = new HttpRequestMessage( 222var request = new HttpRequestMessage(HttpMethod.Put, "http://localhost/Cors/GetUserComments"); 247var request = new HttpRequestMessage(new HttpMethod(method), "http://localhost/Cors/GetExclusiveContent"); 271var request = new HttpRequestMessage( 298var request = new HttpRequestMessage(new HttpMethod(CorsConstants.PreflightHttpMethod), url); 330var request = new HttpRequestMessage(new HttpMethod(CorsConstants.PreflightHttpMethod), url); 367var request = new HttpRequestMessage( 392var request = new HttpRequestMessage( 415var request = new HttpRequestMessage(
CustomValueProviderTest.cs (4)
43var request = new HttpRequestMessage(HttpMethod.Get, url); 60var request = new HttpRequestMessage(HttpMethod.Get, url); 77var request = new HttpRequestMessage(HttpMethod.Get, url); 94var request = new HttpRequestMessage(HttpMethod.Get, url);
DoNotRespectBrowserAcceptHeaderTests.cs (6)
44var request = RequestWithAccept("http://localhost/DoNotRespectBrowserAcceptHeader/EmployeeInfo", acceptHeader); 66var request = RequestWithAccept( 99var request = RequestWithAccept("http://localhost/DoNotRespectBrowserAcceptHeader/CreateEmployee", acceptHeader); 130var request = RequestWithAccept("http://localhost/DoNotRespectBrowserAcceptHeader/CreateEmployee", acceptHeader); 146private static HttpRequestMessage RequestWithAccept(string url, string accept) 148var request = new HttpRequestMessage(HttpMethod.Get, url);
FileResultTests.cs (31)
59var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/DownloadFiles/DownloadFromDisk"); 81var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/DownloadFiles/DownloadFromDisk"); 101var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/DownloadFiles/DownloadFromDisk"); 123var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/DownloadFiles/DownloadFromDisk_WithLastModifiedAndEtag"); 145var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/DownloadFiles/DownloadFromDiskWithFileName_WithLastModifiedAndEtag"); 165var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/DownloadFiles/DownloadFromDiskWithFileName_WithLastModifiedAndEtag"); 209var httpRequestMessage = new HttpRequestMessage(new HttpMethod(httpMethod), "http://localhost/DownloadFiles/DownloadFromDiskWithFileName"); 227var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/DownloadFiles/DownloadFromDiskWithFileName_WithLastModifiedAndEtag"); 247var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/DownloadFiles/DownloadFromDiskWithFileName_WithLastModifiedAndEtag"); 279var httpRequestMessage = new HttpRequestMessage(HttpMethod.Head, "http://localhost/DownloadFiles/DownloadFromDiskWithFileName_WithLastModifiedAndEtag"); 346var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/DownloadFiles/DownloadFromStream"); 368var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/DownloadFiles/DownloadFromStream"); 388var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/DownloadFiles/DownloadFromStream"); 430var httpRequestMessage = new HttpRequestMessage(new HttpMethod(httpMethod), "http://localhost/DownloadFiles/DownloadFromStreamWithFileName"); 448var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/DownloadFiles/DownloadFromStreamWithFileName_WithEtag"); 468var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/DownloadFiles/DownloadFromStreamWithFileName_WithEtag"); 498var httpRequestMessage = new HttpRequestMessage(HttpMethod.Head, "http://localhost/DownloadFiles/DownloadFromStreamWithFileName_WithEtag"); 547var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/DownloadFiles/DownloadFromBinaryData"); 569var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/DownloadFiles/DownloadFromBinaryData"); 589var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/DownloadFiles/DownloadFromBinaryData"); 634var httpRequestMessage = new HttpRequestMessage(new HttpMethod(httpMethod), "http://localhost/DownloadFiles/DownloadFromBinaryDataWithFileName"); 652var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/DownloadFiles/DownloadFromBinaryDataWithFileName_WithEtag"); 672var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/DownloadFiles/DownloadFromBinaryDataWithFileName_WithEtag"); 704var httpRequestMessage = new HttpRequestMessage(HttpMethod.Head, "http://localhost/DownloadFiles/DownloadFromBinaryDataWithFileName_WithEtag"); 760var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/EmbeddedFiles/DownloadFileWithFileName"); 784var httpRequestMessage = new HttpRequestMessage(new HttpMethod(httpMethod), "http://localhost/EmbeddedFiles/DownloadFileWithFileName_RangeProcessingNotEnabled"); 802var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/EmbeddedFiles/DownloadFileWithFileName_WithEtag"); 825var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/EmbeddedFiles/DownloadFileWithFileName_WithEtag"); 850var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/EmbeddedFiles/DownloadFileWithFileName"); 873var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/EmbeddedFiles/DownloadFileWithFileName"); 908var httpRequestMessage = new HttpRequestMessage(HttpMethod.Head, "http://localhost/EmbeddedFiles/DownloadFileWithFileName");
FiltersTest.cs (1)
87var request = new HttpRequestMessage(HttpMethod.Post, url)
FormFileUploadTest.cs (2)
39var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/UploadFiles"); 67var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/UploadProductSpecs");
GlobalAuthorizationFilterTestBase.cs (1)
72var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Administration/EitherCookie");
HtmlGenerationTest.cs (9)
324var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/Customer/HtmlGeneration_Customer"); 350var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Customer/HtmlGeneration_Customer/CustomerWithRecords"); 376var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/Customer/HtmlGeneration_Customer/CustomerWithRecords"); 430var request = RequestWithLocale(targetUrl, "North"); 504var request = new HttpRequestMessage(HttpMethod.Get, "/catalog/cart?correlationid=2"); 617var requestMessage = new HttpRequestMessage(HttpMethod.Post, "/categories/Electronics"); 786var request = new HttpRequestMessage(HttpMethod.Post, "HtmlGeneration_Home/ValidationProviderAttribute"); 804private static HttpRequestMessage RequestWithLocale(string url, string locale) 806var request = new HttpRequestMessage(HttpMethod.Get, url);
InputObjectValidationTests.cs (4)
268var requestMessage = new HttpRequestMessage(HttpMethod.Post, "Validation/ValidationThrowsError_WhenValidationExceedsMaxValidationDepth") 289var requestMessage = new HttpRequestMessage(HttpMethod.Post, "TestApi/PostBookWithNoValidation") 318var requestMessage = new HttpRequestMessage(HttpMethod.Post, "TestApi/PostBookWithNoValidation") 350var requestMessage = new HttpRequestMessage(HttpMethod.Post, "TestApi/PostBookWithNoValidation")
JsonInputFormatterTestBase.cs (1)
223var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/JsonFormatter/ReturnInput/");
JsonOutputFormatterTestBase.cs (1)
51var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/SerializableError/CreateEmployee");
JsonPatchInputFormatterTest.cs (8)
38var request = GetPatchRequest(input); 58var request = GetPatchRequest(input); 78var request = GetPatchRequest(input); 99var request = GetPatchRequest(input); 120var request = GetPatchRequest(input); 140var request = GetPatchRequest(input); 154var request = GetPatchRequest(input); 163private HttpRequestMessage GetPatchRequest(string body)
JsonResultWithNewtonsoftJsonTest.cs (6)
43var request = new HttpRequestMessage(HttpMethod.Get, url); 64var request = new HttpRequestMessage(HttpMethod.Get, url); 83var request = new HttpRequestMessage(HttpMethod.Get, url); 101var request = new HttpRequestMessage(HttpMethod.Get, url); 118var request = new HttpRequestMessage(HttpMethod.Get, url); 134var request = new HttpRequestMessage(HttpMethod.Get, url);
JsonResultWithSystemTextJsonTest.cs (6)
43var request = new HttpRequestMessage(HttpMethod.Get, url); 64var request = new HttpRequestMessage(HttpMethod.Get, url); 83var request = new HttpRequestMessage(HttpMethod.Get, url); 101var request = new HttpRequestMessage(HttpMethod.Get, url); 118var request = new HttpRequestMessage(HttpMethod.Get, url); 134var request = new HttpRequestMessage(HttpMethod.Get, url);
KeyedServicesTests.cs (6)
33var okRequest = new HttpRequestMessage(HttpMethod.Get, "/services/GetOk"); 34var notokRequest = new HttpRequestMessage(HttpMethod.Get, "/services/GetNotOk"); 51var request = new HttpRequestMessage(HttpMethod.Get, "/services/GetBoth"); 65var request = new HttpRequestMessage(HttpMethod.Get, "/services/GetKeyNull"); 79var request = new HttpRequestMessage(HttpMethod.Get, "/services/GetOptionalNotRegistered"); 93var request = new HttpRequestMessage(HttpMethod.Get, "/services/GetRequiredNotRegistered");
NonNullableReferenceTypesTest.cs (2)
52var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/NonNullable"); 94var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/NonNullable");
RazorPageModelTest.cs (7)
39var request = new HttpRequestMessage(HttpMethod.Post, "Pages/TryUpdateModel/10") 64var request = new HttpRequestMessage(HttpMethod.Post, "Pages/TryValidateModel/10") 89var request = new HttpRequestMessage(HttpMethod.Post, "Pages/TryValidateModel/10") 115var request = new HttpRequestMessage(HttpMethod.Post, "Pages/TryUpdateModelPageModel/10") 140var request = new HttpRequestMessage(HttpMethod.Post, "Pages/TryValidateModelPageModel/10") 165var request = new HttpRequestMessage(HttpMethod.Post, "Pages/TryValidateModelPageModel/10") 187private async Task AddAntiforgeryHeaders(HttpRequestMessage request)
RazorPagesTest.cs (41)
101var postRequest = new HttpRequestMessage(HttpMethod.Post, "http://localhost/HandlerTestPage"); 133var postRequest = new HttpRequestMessage(HttpMethod.Post, "http://localhost/HandlerTestPage/CustomActionResult"); 214var postRequest = new HttpRequestMessage(HttpMethod.Post, "http://localhost/ModelHandlerTestPage"); 246var postRequest = new HttpRequestMessage(HttpMethod.Post, "http://localhost/ModelHandlerTestPage/CustomActionResult"); 272var routeRequest = new HttpRequestMessage(HttpMethod.Get, "http://localhost/RouteData/pizza"); 285var routeRequest = new HttpRequestMessage(HttpMethod.Get, "http://localhost/RouteData/5"); 301var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/PathSet"); 317var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/TagHelpers"); 333var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/NoPage"); 346var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Pages/HandlerWithParameter"); 362var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/HelloWorld"); 378var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/HelloWorldWithRoute/Some/Path/route"); 394var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/HelloWorldWithHandler?message=handler"); 410var getRequest = new HttpRequestMessage(HttpMethod.Get, "http://localhost/HelloWorldWithPageModelHandler?message=message"); 416var postRequest = new HttpRequestMessage(HttpMethod.Post, "http://localhost/HelloWorldWithPageModelHandler"); 437var request = new HttpRequestMessage(new HttpMethod(httpMethod), url); 466var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/PageWithoutContent/No/Content/Path"); 482var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/OnGetView"); 499var request = new HttpRequestMessage(HttpMethod.Get, url); 524var request = new HttpRequestMessage(HttpMethod.Get, url); 549var request = new HttpRequestMessage(HttpMethod.Get, url); 573var getRequest = new HttpRequestMessage(HttpMethod.Get, "http://localhost/TempData/TempDataPageModelProperty"); 580var request = new HttpRequestMessage(HttpMethod.Post, url); 671var request = new HttpRequestMessage(HttpMethod.Post, "Pages/PropertyBinding/PagePropertyBinding/10") 700var request = new HttpRequestMessage(HttpMethod.Post, "Pages/PropertyBinding/PagePropertyBinding/27") 726var request = new HttpRequestMessage(HttpMethod.Post, "Pages/PropertyBinding/PageModelWithPropertyBinding/10?PropertyWithSupportGetsTrue=foo") 757var request = new HttpRequestMessage(HttpMethod.Post, url) 786var request = new HttpRequestMessage(HttpMethod.Post, "Pages/PropertyBinding/PolymorphicBinding") 811var request = new HttpRequestMessage(HttpMethod.Post, "Pages/PropertyBinding/PolymorphicBinding") 842var request = new HttpRequestMessage(HttpMethod.Post, "Pages/PropertyBinding/PageWithPropertyAndArgumentBinding?id=11") 867var request = new HttpRequestMessage(HttpMethod.Get, "Pages/PropertyBinding/PageWithPropertyAndArgumentBinding?id=11") 890var request = new HttpRequestMessage(HttpMethod.Head, "Pages/PropertyBinding/PageModelWithPropertyBinding/10?PropertyWithSupportGetsTrue=foo"); 906var request = new HttpRequestMessage(HttpMethod.Head, "Pages/PropertyBinding/BindPropertyWithGet?value=11"); 923var request = new HttpRequestMessage(HttpMethod.Get, "Pages/PropertyBinding/BindPropertyWithGet?value=11"); 983var request = new HttpRequestMessage(HttpMethod.Post, "/Pages/Redirects/RedirectToSelf") 1288var request = new HttpRequestMessage(HttpMethod.Post, "/Pages/PropertyBinding/BindPropertiesOnModel?Property1=123") 1326var request = new HttpRequestMessage(HttpMethod.Post, "/Pages/PropertyBinding/BindPropertiesOnModel?Property1=123") 1455var request = new HttpRequestMessage(HttpMethod.Options, "http://localhost/HelloWorld"); 1471var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/HelloWorldWithOptionsHandler"); 1487var request = new HttpRequestMessage(HttpMethod.Options, "http://localhost/HelloWorldWithOptionsHandler"); 1499private async Task AddAntiforgeryHeaders(HttpRequestMessage request)
RazorPagesWithBasePathTest.cs (9)
432var message = new HttpRequestMessage(HttpMethod.Post, "/CustomModelTypeModel") 461var message = new HttpRequestMessage(HttpMethod.Post, "/CustomModelTypeModel?Attempts=3") 489var message = new HttpRequestMessage(HttpMethod.Post, "/CustomModelTypeModel") 616var request = new HttpRequestMessage(HttpMethod.Head, "/Antiforgery/AntiforgeryDefault"); 629var request = new HttpRequestMessage(HttpMethod.Post, "/Antiforgery/AntiforgeryDefault"); 642var request = new HttpRequestMessage(HttpMethod.Post, "/Antiforgery/AntiforgeryDefault"); 656var request = new HttpRequestMessage(HttpMethod.Post, "/Antiforgery/IgnoreAntiforgery"); 707var request = new HttpRequestMessage(HttpMethod.Post, url) 753private async Task AddAntiforgeryHeadersAsync(HttpRequestMessage request)
ReadFromDisconnectedClientTest.cs (2)
42var request = new HttpRequestMessage(HttpMethod.Post, "ReadFromThrowingRequestBody/AppliesAntiforgeryValidation"); 55var request = new HttpRequestMessage(HttpMethod.Post, "ReadFromThrowingRequestBody/ReadForm");
RequestFormLimitsTest.cs (4)
39var request = new HttpRequestMessage(); 61var request = new HttpRequestMessage(); 84var request = new HttpRequestMessage(); 156var request = new HttpRequestMessage();
RequestServicesTestBase.cs (4)
53var request = new HttpRequestMessage(HttpMethod.Get, url); 76var request = new HttpRequestMessage(HttpMethod.Get, url); 96var request1 = new HttpRequestMessage(HttpMethod.Get, url); 105var request2 = new HttpRequestMessage(HttpMethod.Get, url);
RequestSizeLimitTest.cs (3)
40var request = new HttpRequestMessage(); 62var request = new HttpRequestMessage(); 81var request = new HttpRequestMessage();
RespectBrowserAcceptHeaderTests.cs (2)
43var request = new HttpRequestMessage(HttpMethod.Get, "RespectBrowserAcceptHeader/ReturnString"); 62var request = new HttpRequestMessage(HttpMethod.Get, "RespectBrowserAcceptHeader/ReturnString");
RoutingAcrossPipelineBranchesTest.cs (12)
42var subdirRequest = new HttpRequestMessage(HttpMethod.Get, "subdir/literal/Branches/Index/s"); 43var commonRequest = new HttpRequestMessage(HttpMethod.Get, "common/Branches/Index/c/literal"); 44var defaultRequest = new HttpRequestMessage(HttpMethod.Get, "Branches/literal/Index/d"); 77var subdirRequest = new HttpRequestMessage(HttpMethod.Get, "subdir/literal/Branches/Index/s" + linkQuery); 78var commonRequest = new HttpRequestMessage(HttpMethod.Get, "common/Branches/Index/c/literal" + linkQuery); 79var defaultRequest = new HttpRequestMessage(HttpMethod.Get, "Branches/literal/Index/d" + linkQuery); 111var subdirRequest = new HttpRequestMessage(HttpMethod.Get, "subdir/literal/Branches/Index/s" + linkQuery + "&link_common=c&link_subdir"); 112var defaultRequest = new HttpRequestMessage(HttpMethod.Get, "Branches/literal/Index/d" + linkQuery + "&link_subdir=s"); 140var commonRequest = new HttpRequestMessage(HttpMethod.Get, "common/literal/Branches/Index/s"); 141var subdirRequest = new HttpRequestMessage(HttpMethod.Get, "subdir/Branches/Index/c/literal"); 142var defaultRequest = new HttpRequestMessage(HttpMethod.Get, "common/Branches/literal/Index/d"); 163var request = new HttpRequestMessage(HttpMethod.Get, "dynamicattributeorder/dynamic/route/rest");
RoutingDynamicOrderTest.cs (6)
44var request = new HttpRequestMessage(HttpMethod.Get, url); 66var request = new HttpRequestMessage(HttpMethod.Get, url); 89var request = new HttpRequestMessage(HttpMethod.Get, url); 111var request = new HttpRequestMessage(HttpMethod.Get, url); 133var request = new HttpRequestMessage(HttpMethod.Get, url); 155var request = new HttpRequestMessage(HttpMethod.Get, url);
RoutingDynamicTest.cs (7)
40var request = new HttpRequestMessage(HttpMethod.Get, url); 55var request = new HttpRequestMessage(HttpMethod.Get, url); 70var request = new HttpRequestMessage(HttpMethod.Get, url); 86var request = new HttpRequestMessage(HttpMethod.Get, url); 100var request = new HttpRequestMessage(HttpMethod.Post, url); 116var request = new HttpRequestMessage(HttpMethod.Get, url); 132var request = new HttpRequestMessage(HttpMethod.Get, url);
RoutingFallbackTest.cs (7)
41var request = new HttpRequestMessage(HttpMethod.Get, url); 56var request = new HttpRequestMessage(HttpMethod.Get, url); 72var request = new HttpRequestMessage(HttpMethod.Get, url); 88var request = new HttpRequestMessage(HttpMethod.Post, url); 104var request = new HttpRequestMessage(HttpMethod.Post, url); 120var request = new HttpRequestMessage(HttpMethod.Get, url); 136var request = new HttpRequestMessage(HttpMethod.Post, url)
RoutingTestsBase.cs (14)
401var request = new HttpRequestMessage(new HttpMethod(method), $"http://localhost{url}"); 454var request = new HttpRequestMessage(new HttpMethod(method), $"http://localhost{url}"); 703var message = new HttpRequestMessage(new HttpMethod(method), "http://localhost/Store/Shop/Orders"); 728var message = new HttpRequestMessage(new HttpMethod(method), "http://localhost/api/Employee/5/Salary"); 748var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Store/Shop/Orders"); 771var message = new HttpRequestMessage(new HttpMethod(verb), "http://localhost/api/Employee"); 793var message = new HttpRequestMessage(new HttpMethod(verb), "http://localhost/api/Employee/Manager"); 818var message = new HttpRequestMessage(new HttpMethod(verb), "http://localhost/" + path); 838var message = new HttpRequestMessage(new HttpMethod("MERGE"), "http://localhost/api/Employee/5"); 861var message = new HttpRequestMessage(new HttpMethod(verb), "http://localhost/api/Employee/5/Administrator"); 1064var message = new HttpRequestMessage(new HttpMethod(method), "http://localhost/api/Company/5"); 1486var request = new HttpRequestMessage(new HttpMethod(verb), "http://localhost" + path); 1521var request = new HttpRequestMessage(new HttpMethod(verb), "http://localhost" + path); 1538var request = new HttpRequestMessage(new HttpMethod(verb), "http://localhost" + path);
SerializableErrorTests.cs (4)
50var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/SerializableError/ModelStateErrors"); 72var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/SerializableError/LogErrors") 120var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/SerializableError/CreateEmployee"); 161var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/SerializableError/CreateEmployee");
SimpleWithWebApplicationBuilderTests.cs (2)
232var request = new HttpRequestMessage(HttpMethod.Post, "accepts-default"); 247var request = new HttpRequestMessage(HttpMethod.Post, "accepts-xml");
TagHelperComponentTagHelperTest.cs (3)
37var request = new HttpRequestMessage(HttpMethod.Get, url); 57var request = new HttpRequestMessage(HttpMethod.Get, url); 77var request = new HttpRequestMessage(HttpMethod.Get, url);
TagHelpersFromServicesTest.cs (1)
34var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/another/inservicestaghelper");
TempDataInCookiesUsingCookieConsentTest.cs (5)
92private HttpRequestMessage GetRequest(string path, HttpResponseMessage response) 94var request = new HttpRequestMessage(HttpMethod.Get, path); 99private HttpRequestMessage GetPostRequest(string path, HttpContent content, HttpResponseMessage response) 101var request = new HttpRequestMessage(HttpMethod.Post, path); 107private void SetCookieHeaders(HttpRequestMessage request, HttpResponseMessage response)
TempDataPropertyTest.cs (2)
160private HttpRequestMessage GetRequest(string path, HttpResponseMessage response) 162var request = new HttpRequestMessage(HttpMethod.Get, path);
TempDataTestBase.cs (2)
262public HttpRequestMessage GetRequest(string path, HttpResponseMessage response) 264var request = new HttpRequestMessage(HttpMethod.Get, path);
TestingInfrastructureTests.cs (8)
56var request = new HttpRequestMessage(HttpMethod.Post, "Testing/RedirectHandler/2") 77var request = new HttpRequestMessage(HttpMethod.Post, "Testing/RedirectHandler/2") 100var request = new HttpRequestMessage(HttpMethod.Get, "Testing/RedirectHandler/Headers"); 116var request = new HttpRequestMessage(HttpMethod.Get, "Testing/RedirectHandler/Redirect303"); 130var request = new HttpRequestMessage(HttpMethod.Get, "Testing/RedirectHandler/Relative/"); 143var request = new HttpRequestMessage(HttpMethod.Get, "Testing/RedirectHandler/Redirect303"); 234var request = new HttpRequestMessage(HttpMethod.Get, "Testing/RedirectHandler/RedirectToAuthorized"); 272protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
VersioningEndpointRoutingTests.cs (2)
34var message = new HttpRequestMessage(HttpMethod.Delete, "http://localhost/" + "Customers/5?version=2"); 53var message = new HttpRequestMessage(HttpMethod.Post, "http://localhost/" + "Customers?version=2");
VersioningTestsBase.cs (24)
45var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/api/Addresses?version=" + version); 68var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/api/Addresses/All" + query); 89var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Tickets"); 110var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Tickets?version=2"); 129var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Tickets/5"); 148var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Tickets/5?version=2"); 175var message = new HttpRequestMessage(HttpMethod.Post, "http://localhost/Tickets?version=" + version); 199var message = new HttpRequestMessage(HttpMethod.Post, "http://localhost/Tickets"); 224var message = new HttpRequestMessage(new HttpMethod(method), "http://localhost/Tickets/5?version=" + version); 250var message = new HttpRequestMessage(new HttpMethod(method), "http://localhost/Tickets/5"); 269var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Books?version=" + version); 291var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Books?version=" + version); 312var message = new HttpRequestMessage(new HttpMethod(method), "http://localhost/Movies"); 333var message = new HttpRequestMessage(new HttpMethod(method), "http://localhost/Movies?version=2"); 355var message = new HttpRequestMessage(new HttpMethod(method), "http://localhost/Movies/5"); 376var message = new HttpRequestMessage(new HttpMethod(method), "http://localhost/Movies/5?version=2"); 395var message = new HttpRequestMessage(HttpMethod.Put, "http://localhost/Movies/5?version=2"); 417var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/" + url); 438var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/" + url); 459var message = new HttpRequestMessage(HttpMethod.Post, "http://localhost/" + url); 483var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/" + url + query); 502var message = new HttpRequestMessage(HttpMethod.Post, "http://localhost/" + "Customers?version=2"); 521var message = new HttpRequestMessage(HttpMethod.Delete, "http://localhost/" + "Customers/5?version=2"); 543var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost" + path);
ViewComponentFromServicesTests.cs (1)
35var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/another/InServicesViewComponent");
ViewEngineTests.cs (2)
163var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/TemplateExpander"); 307var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/TemplateExpander/ViewWithLayout");
XmlDataContractSerializerFormattersWrappingTest.cs (8)
44var request = new HttpRequestMessage(HttpMethod.Get, url); 68var request = new HttpRequestMessage(HttpMethod.Get, url); 92var request = new HttpRequestMessage(HttpMethod.Get, url); 115var request = new HttpRequestMessage(HttpMethod.Get, url); 138var request = new HttpRequestMessage(HttpMethod.Get, url); 163var request = new HttpRequestMessage(HttpMethod.Get, url); 186var request = new HttpRequestMessage(HttpMethod.Get, url); 207var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/IEnumerable/SerializableErrors");
XmlDataContractSerializerInputFormatterTest.cs (2)
58var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/Validation/CreateStore"); 86var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/Validation/CreateStore");
XmlOutputFormatterTests.cs (10)
40var request = new HttpRequestMessage( 62var request = new HttpRequestMessage( 85var request = new HttpRequestMessage( 106var request = new HttpRequestMessage( 129var request = new HttpRequestMessage( 150var request = new HttpRequestMessage( 168var request = new HttpRequestMessage( 188var request = new HttpRequestMessage( 208var request = new HttpRequestMessage( 229var request = new HttpRequestMessage(
XmlSerializerFormattersWrappingTest.cs (8)
43var request = new HttpRequestMessage(HttpMethod.Get, url); 64var request = new HttpRequestMessage(HttpMethod.Get, url); 85var request = new HttpRequestMessage(HttpMethod.Get, url); 105var request = new HttpRequestMessage(HttpMethod.Get, url); 125var request = new HttpRequestMessage(HttpMethod.Get, url); 147var request = new HttpRequestMessage(HttpMethod.Get, url); 167var request = new HttpRequestMessage(HttpMethod.Get, url); 185var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/IEnumerable/SerializableErrors");
Microsoft.AspNetCore.Mvc.Testing (11)
Handlers\CookieContainerHandler.cs (2)
12/// more pairs of <see cref="HttpRequestMessage"/> and <see cref="HttpResponseMessage"/>. 41protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Handlers\RedirectHandler.cs (6)
45protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 48var redirectRequest = new HttpRequestMessage(); 63private static bool HasBody(HttpRequestMessage request) => 66private static async Task<HttpContent?> DuplicateRequestContent(HttpRequestMessage request) 111private static async Task<(Stream originalBody, Stream copy)> CopyBody(HttpRequestMessage request) 134HttpRequestMessage redirect,
WebApplicationFactory.cs (3)
39/// and one or more <see cref="HttpClient"/> instances used to send <see cref="HttpRequestMessage"/> to the <see cref="TestServer"/>. 471/// send <see cref="HttpRequestMessage"/> to the server. The base address of the <see cref="HttpClient"/> 519/// send <see cref="HttpRequestMessage"/> to the server.
Microsoft.AspNetCore.OutputCaching.Tests (1)
TestUtils.cs (1)
269public static HttpRequestMessage CreateRequest(string method, string requestUri)
Microsoft.AspNetCore.RequestDecompression.Tests (6)
RequestDecompressionMiddlewareTests.cs (6)
239using var request = new HttpRequestMessage(HttpMethod.Post, ""); 310using var request = new HttpRequestMessage(HttpMethod.Post, ""); 386using var request = new HttpRequestMessage(HttpMethod.Post, ""); 488using var request = new HttpRequestMessage(HttpMethod.Post, ""); 572using var request = new HttpRequestMessage(HttpMethod.Post, ""); 723using var request = new HttpRequestMessage(HttpMethod.Post, "");
Microsoft.AspNetCore.ResponseCaching.Tests (1)
TestUtils.cs (1)
255public static HttpRequestMessage CreateRequest(string method, string requestUri)
Microsoft.AspNetCore.ResponseCompression.Tests (17)
ResponseCompressionMiddlewareTest.cs (17)
177var request = new HttpRequestMessage(HttpMethod.Get, ""); 335var request = new HttpRequestMessage(HttpMethod.Get, ""); 474var request = new HttpRequestMessage(HttpMethod.Get, ""); 537var request = new HttpRequestMessage(HttpMethod.Get, ""); 600var request = new HttpRequestMessage(HttpMethod.Get, ""); 653var request = new HttpRequestMessage(HttpMethod.Get, ""); 698var request = new HttpRequestMessage(HttpMethod.Get, ""); 750var request = new HttpRequestMessage(HttpMethod.Get, ""); 803var request = new HttpRequestMessage(HttpMethod.Get, ""); 873var request = new HttpRequestMessage(HttpMethod.Get, ""); 937var request = new HttpRequestMessage(HttpMethod.Get, ""); 1001var request = new HttpRequestMessage(HttpMethod.Get, ""); 1062var request = new HttpRequestMessage(HttpMethod.Get, ""); 1112var request = new HttpRequestMessage(HttpMethod.Get, ""); 1162var request = new HttpRequestMessage(HttpMethod.Get, ""); 1212var request = new HttpRequestMessage(HttpMethod.Get, ""); 1278var request = new HttpRequestMessage(new HttpMethod(httpMethod), "");
Microsoft.AspNetCore.Routing.FunctionalTests (30)
EndpointRoutingSampleTest.cs (1)
36var message = new HttpRequestMessage(HttpMethod.Get, $"{branch}/api/get/5");
HostMatchingTests.cs (5)
32var request = new HttpRequestMessage(HttpMethod.Get, "api/DomainWildcard"); 50var request = new HttpRequestMessage(HttpMethod.Get, "api/DomainWildcard"); 68var request = new HttpRequestMessage(HttpMethod.Get, "api/DomainWildcard"); 86var request = new HttpRequestMessage(HttpMethod.Get, "api/DomainWildcard"); 104var request = new HttpRequestMessage(HttpMethod.Get, "api/DomainWildcard");
MapFallbackTest.cs (5)
25var request = new HttpRequestMessage(HttpMethod.Get, "helloworld"); 42var request = new HttpRequestMessage(HttpMethod.Get, path); 59var request = new HttpRequestMessage(HttpMethod.Get, path); 76var request = new HttpRequestMessage(HttpMethod.Get, path); 93var request = new HttpRequestMessage(HttpMethod.Get, path);
MinimalFormTests.cs (12)
53var request = new HttpRequestMessage(HttpMethod.Post, "todo"); 113var request = new HttpRequestMessage(HttpMethod.Post, "todo"); 160var request = new HttpRequestMessage(HttpMethod.Post, "todo"); 199var request = new HttpRequestMessage(HttpMethod.Post, "todo"); 276var request = new HttpRequestMessage(HttpMethod.Post, "todo"); 323var request = new HttpRequestMessage(HttpMethod.Post, "todo"); 419var request = new HttpRequestMessage(HttpMethod.Post, "todo"); 474var request = new HttpRequestMessage(HttpMethod.Post, "todo"); 533var request = new HttpRequestMessage(HttpMethod.Post, "todo"); 585var request = new HttpRequestMessage(HttpMethod.Post, "/todos/1"); 637var request = new HttpRequestMessage(HttpMethod.Post, "/todos/1"); 686var request = new HttpRequestMessage(HttpMethod.Post, "todo");
RouterSampleTest.cs (4)
34var message = new HttpRequestMessage(HttpMethod.Get, $"{branch}/api/get/5"); 48var message = new HttpRequestMessage(HttpMethod.Get, "api/get/5"); 62var message = new HttpRequestMessage(HttpMethod.Get, "api/middleware"); 83var message = new HttpRequestMessage(new HttpMethod(httpVerb), "api/all/Joe/Duf");
WebHostBuilderExtensionsTest.cs (3)
17public static TheoryData<Action<IRouteBuilder>, HttpRequestMessage, string> MatchesRequest 21return new TheoryData<Action<IRouteBuilder>, HttpRequestMessage, string>() 76public async Task UseRouter_MapGet_MatchesRequest(Action<IRouteBuilder> routeBuilder, HttpRequestMessage request, string expected)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (6)
Http3Tests.cs (1)
75var request = new HttpRequestMessage(HttpMethod.Get, address);
Listener\ResponseHeaderTests.cs (2)
342var request = new HttpRequestMessage(HttpMethod.Get, uri); 356var request = new HttpRequestMessage(HttpMethod.Head, uri);
OpaqueUpgradeTests.cs (1)
297var request = new HttpRequestMessage(HttpMethod.Post, address);
ResponseHeaderTests.cs (2)
172HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, address); 199HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, address);
Microsoft.AspNetCore.Server.IISIntegration.Tests (10)
IISMiddlewareTests.cs (10)
54var req = new HttpRequestMessage(HttpMethod.Get, ""); 92var req = new HttpRequestMessage(HttpMethod.Get, ""); 134var request = new HttpRequestMessage(HttpMethod.Post, requestPath); 193var request = new HttpRequestMessage(method, "/iisintegration"); 238var request = new HttpRequestMessage(HttpMethod.Post, path); 283var request = new HttpRequestMessage(HttpMethod.Post, "/iisintegration"); 383var request = new HttpRequestMessage(HttpMethod.Get, "/PathBase/Path"); 424var req = new HttpRequestMessage(HttpMethod.Get, ""); 481var req = new HttpRequestMessage(HttpMethod.Get, ""); 526var req = new HttpRequestMessage(HttpMethod.Get, "");
Microsoft.AspNetCore.Server.IntegrationTesting (1)
Common\LoggingHandler.cs (1)
18protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (2)
LoggingHandler.cs (1)
22HttpRequestMessage request,
RetryHandler.cs (1)
24HttpRequestMessage request,
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (7)
WebHostTests.cs (7)
79var request = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 246var request1 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 260var request2 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 317var request1 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 330var request2 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 352var request1 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{http3Port}/"); 366var request2 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{http1Port}/");
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (1)
HubConnectionTests.cs (1)
2978protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Microsoft.AspNetCore.SignalR.Client.Tests (76)
LongPollingTransportTests.cs (32)
35.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 36.Returns<HttpRequestMessage, CancellationToken>(async (request, cancellationToken) => 70.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 71.Returns<HttpRequestMessage, CancellationToken>(async (request, cancellationToken) => 104.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 105.Returns<HttpRequestMessage, CancellationToken>(async (request, cancellationToken) => 159.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 160.Returns<HttpRequestMessage, CancellationToken>(async (request, cancellationToken) => 187.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 188.Returns<HttpRequestMessage, CancellationToken>(async (request, cancellationToken) => 233.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 234.Returns<HttpRequestMessage, CancellationToken>(async (request, cancellationToken) => 278.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 279.Returns<HttpRequestMessage, CancellationToken>(async (request, cancellationToken) => 327.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 328.Returns<HttpRequestMessage, CancellationToken>(async (request, cancellationToken) => 369.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 370.Returns<HttpRequestMessage, CancellationToken>(async (request, cancellationToken) => 404var sentRequests = new List<HttpRequestMessage>(); 406.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 407.Returns<HttpRequestMessage, CancellationToken>(async (request, cancellationToken) => 463.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 464.Returns<HttpRequestMessage, CancellationToken>(async (request, cancellationToken) => 531.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 532.Returns<HttpRequestMessage, CancellationToken>(async (request, cancellationToken) => 587.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 588.Returns<HttpRequestMessage, CancellationToken>(async (request, cancellationToken) => 616.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 617.Returns<HttpRequestMessage, CancellationToken>(async (request, cancellationToken) => 642.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 643.Returns<HttpRequestMessage, CancellationToken>(async (request, cancellationToken) => 692var deleteRequest = handler.ReceivedRequests.SingleOrDefault(r => r.Method == HttpMethod.Delete);
ResponseUtils.cs (5)
34public static bool IsNegotiateRequest(HttpRequestMessage request) 40public static bool IsLongPollRequest(HttpRequestMessage request) 47public static bool IsLongPollDeleteRequest(HttpRequestMessage request) 53public static bool IsServerSentEventsRequest(HttpRequestMessage request) 58public static bool IsSocketSendRequest(HttpRequestMessage request)
ServerSentEventsTransportTests.cs (20)
31.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 32.Returns<HttpRequestMessage, CancellationToken>(async (request, cancellationToken) => 72.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 73.Returns<HttpRequestMessage, CancellationToken>((request, cancellationToken) => 125.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 126.Returns<HttpRequestMessage, CancellationToken>(async (request, cancellationToken) => 175.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 176.Returns<HttpRequestMessage, CancellationToken>(async (request, cancellationToken) => 230.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 231.Returns<HttpRequestMessage, CancellationToken>(async (request, cancellationToken) => 273.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 274.Returns<HttpRequestMessage, CancellationToken>(async (request, cancellationToken) => 304.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 305.Returns<HttpRequestMessage, CancellationToken>(async (request, cancellationToken) => 362.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 363.Returns<HttpRequestMessage, CancellationToken>(async (request, cancellationToken) => 389.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 390.Returns<HttpRequestMessage, CancellationToken>(async (request, cancellationToken) => 474.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 475.Returns<HttpRequestMessage, CancellationToken>(async (request, cancellationToken) =>
TestHttpMessageHandler.cs (19)
15delegate Task<HttpResponseMessage> RequestDelegate(HttpRequestMessage requestMessage, CancellationToken cancellationToken); 19private readonly List<HttpRequestMessage> _receivedRequests = new List<HttpRequestMessage>(); 27public IReadOnlyList<HttpRequestMessage> ReceivedRequests 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) 216public void OnLongPoll(Func<HttpRequestMessage, CancellationToken, HttpResponseMessage> handler) 221public void OnLongPoll(Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> handler) 254private Task<HttpResponseMessage> BaseHandler(HttpRequestMessage request, CancellationToken cancellationToken)
Microsoft.AspNetCore.SignalR.Tests (4)
EndToEndTests.cs (4)
174.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 175.Returns<HttpRequestMessage, CancellationToken>( 224.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 225.Returns<HttpRequestMessage, CancellationToken>(
Microsoft.AspNetCore.SpaServices.Extensions (3)
Proxying\SpaProxy.cs (3)
85using (var requestMessage = CreateProxyHttpRequest(context, targetUri)) 129private static HttpRequestMessage CreateProxyHttpRequest(HttpContext context, Uri uri) 133var requestMessage = new HttpRequestMessage();
Microsoft.AspNetCore.SpaServices.Extensions.Tests (4)
SpaProxyTests.cs (4)
19private static (HttpContext, HttpClient) GetHttpContextAndClient(string path, string queryString, Action<HttpRequestMessage> callback) 24ItExpr.IsAny<HttpRequestMessage>(), 26.Callback<HttpRequestMessage, CancellationToken>((req, c) => callback(req)) 55HttpRequestMessage forwardedRequestMessage = null;
Microsoft.AspNetCore.StaticAssets.Tests (25)
StaticAssetsIntegrationTests.cs (25)
438var message = new HttpRequestMessage(HttpMethod.Get, "/sample.txt"); 651var req = new HttpRequestMessage(method, "http://localhost/sample.txt"); 664var req = new HttpRequestMessage(method, "http://localhost/sample.txt"); 675var req = new HttpRequestMessage(method, "http://localhost/sample.txt"); 686var req = new HttpRequestMessage(method, "http://localhost/sample.txt"); 713var req2 = new HttpRequestMessage(method, "http://localhost/sample.txt"); 726var req2 = new HttpRequestMessage(method, "http://localhost/sample.txt"); 739var req2 = new HttpRequestMessage(method, "http://localhost/sample.txt"); 783var req1 = new HttpRequestMessage(method, "http://localhost/sample.txt"); 786var req2 = new HttpRequestMessage(method, "http://localhost/sample.txt"); 799var req1 = new HttpRequestMessage(method, "http://localhost/sample.txt"); 803var req2 = new HttpRequestMessage(method, "http://localhost/sample.txt"); 810var req3 = new HttpRequestMessage(method, "http://localhost/sample.txt"); 822var req1 = new HttpRequestMessage(method, "http://localhost/sample.txt"); 829var req2 = new HttpRequestMessage(method, "http://localhost/sample.txt"); 834var req3 = new HttpRequestMessage(method, "http://localhost/sample.txt"); 839var req4 = new HttpRequestMessage(method, "http://localhost/sample.txt"); 867var req = new HttpRequestMessage(method, "http://localhost/sample.txt"); 880var req = new HttpRequestMessage(method, "http://localhost/sample.txt"); 903var req2 = new HttpRequestMessage(method, "http://localhost/sample.txt"); 927var req2 = new HttpRequestMessage(method, "sample.txt"); 944var req2 = new HttpRequestMessage(method, "http://localhost/sample.txt"); 957var req = new HttpRequestMessage(method, "http://localhost/sample.txt"); 969var req = new HttpRequestMessage(method, "http://localhost/sample.txt"); 985var req2 = new HttpRequestMessage(method, "http://localhost/sample.txt");
Microsoft.AspNetCore.StaticFiles.FunctionalTests (1)
StaticFileMiddlewareTests.cs (1)
201var request = new HttpRequestMessage(HttpMethod.Head, requestUrl);
Microsoft.AspNetCore.StaticFiles.Tests (29)
CacheHeaderTests.cs (7)
50var req = new HttpRequestMessage(method, "http://localhost/SubFolder/extra.xml"); 64var req = new HttpRequestMessage(method, "http://localhost/SubFolder/extra.xml"); 76var req = new HttpRequestMessage(method, "http://localhost/SubFolder/extra.xml"); 88var req = new HttpRequestMessage(method, "http://localhost/SubFolder/extra.xml"); 116var req2 = new HttpRequestMessage(method, "http://localhost/SubFolder/extra.xml"); 130var req2 = new HttpRequestMessage(method, "http://localhost/SubFolder/extra.xml"); 144var req2 = new HttpRequestMessage(method, "http://localhost/SubFolder/extra.xml");
RangeHeaderTests.cs (22)
23var req = new HttpRequestMessage(HttpMethod.Get, "http://localhost/SubFolder/ranges.txt"); 44var req = new HttpRequestMessage(HttpMethod.Head, "http://localhost/SubFolder/ranges.txt"); 65var req = new HttpRequestMessage(HttpMethod.Get, "http://localhost/SubFolder/ranges.txt"); 82var req = new HttpRequestMessage(HttpMethod.Get, "http://localhost/SubFolder/ranges.txt"); 99var req = new HttpRequestMessage(HttpMethod.Get, "http://localhost/SubFolder/ranges.txt"); 116var req = new HttpRequestMessage(HttpMethod.Head, "http://localhost/SubFolder/ranges.txt"); 135var req = new HttpRequestMessage(HttpMethod.Get, "http://localhost/SubFolder/ranges.txt"); 152var req = new HttpRequestMessage(HttpMethod.Head, "http://localhost/SubFolder/ranges.txt"); 171var req = new HttpRequestMessage(HttpMethod.Get, "http://localhost/SubFolder/ranges.txt"); 190var req = new HttpRequestMessage(HttpMethod.Head, "http://localhost/SubFolder/ranges.txt"); 210var req = new HttpRequestMessage(HttpMethod.Get, "http://localhost/SubFolder/ranges.txt"); 237var req = new HttpRequestMessage(HttpMethod.Head, "http://localhost/SubFolder/ranges.txt"); 270var req = new HttpRequestMessage(HttpMethod.Get, "http://localhost/SubFolder/ranges.txt"); 291var req = new HttpRequestMessage(HttpMethod.Get, "http://localhost/SubFolder/SingleByte.txt"); 312var req = new HttpRequestMessage(HttpMethod.Get, "http://localhost/SubFolder/Empty.txt"); 326var req = new HttpRequestMessage(HttpMethod.Head, "http://localhost/SubFolder/ranges.txt"); 344var req = new HttpRequestMessage(HttpMethod.Get, "http://localhost/SubFolder/ranges.txt"); 359var req = new HttpRequestMessage(HttpMethod.Head, "http://localhost/SubFolder/ranges.txt"); 379var req = new HttpRequestMessage(HttpMethod.Get, "http://localhost/SubFolder/ranges.txt"); 401var req = new HttpRequestMessage(HttpMethod.Head, "http://localhost/SubFolder/ranges.txt"); 422var req = new HttpRequestMessage(HttpMethod.Get, "http://localhost/SubFolder/ranges.txt"); 442var req = new HttpRequestMessage(HttpMethod.Head, "http://localhost/SubFolder/ranges.txt");
Microsoft.AspNetCore.TestHost (7)
ClientHandler.cs (5)
52/// <param name="request">The <see cref="HttpRequestMessage"/>.</param> 56/// Use the asynchronous version of this method, <see cref="SendAsync(HttpRequestMessage, CancellationToken)"/>, instead. 59HttpRequestMessage request, 71/// <param name="request">The <see cref="HttpRequestMessage"/>.</param> 75HttpRequestMessage request,
RequestBuilder.cs (2)
13private readonly HttpRequestMessage _req; 36public RequestBuilder And(Action<HttpRequestMessage> configure)
Microsoft.AspNetCore.TestHost.Tests (17)
ClientHandlerTests.cs (5)
219var message = new HttpRequestMessage(HttpMethod.Post, "https://example.com/"); 314var message = new HttpRequestMessage(HttpMethod.Post, "https://example.com/"); 342var message = new HttpRequestMessage(HttpMethod.Post, "https://example.com/"); 360HttpRequestMessage message = new HttpRequestMessage(HttpMethod.Post, "https://example.com/"); 497using (var message = new HttpRequestMessage(HttpMethod.Post, "https://example.com/"))
TestClientTests.cs (11)
196var httpRequest = new HttpRequestMessage(HttpMethod.Post, "http://localhost:12345"); 253var message = new HttpRequestMessage(HttpMethod.Post, "https://example.com/"); 304var httpRequest = new HttpRequestMessage(HttpMethod.Post, "http://localhost:12345"); 361var httpRequest = new HttpRequestMessage(HttpMethod.Post, "http://localhost:12345"); 423var httpRequest = new HttpRequestMessage(HttpMethod.Post, "http://localhost:12345"); 470var httpRequest = new HttpRequestMessage(HttpMethod.Post, "http://localhost:12345"); 521var httpRequest = new HttpRequestMessage(HttpMethod.Post, "http://localhost:12345"); 850var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost:12345"); 952var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost:12345"); 978var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost:12345"); 1005var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost:12345");
TestServerTests.cs (1)
790var request = new HttpRequestMessage(HttpMethod.Get, uri);
Microsoft.AspNetCore.Testing.Tests (4)
FakeCertificateHttpClientHandlerTests.cs (1)
18private readonly HttpRequestMessage _request = new();
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.WebSockets.Tests (8)
WebSocketCompressionMiddlewareTests.cs (4)
34using (var request = new HttpRequestMessage(HttpMethod.Get, uri.ToString())) 62using (var request = new HttpRequestMessage(HttpMethod.Get, uri.ToString())) 96using (var request = new HttpRequestMessage(HttpMethod.Get, uri.ToString())) 168private static void SetGenericWebSocketRequest(HttpRequestMessage request)
WebSocketMiddlewareTests.cs (4)
675using (var request = new HttpRequestMessage(HttpMethod.Get, uri.ToString())) 708using (var request = new HttpRequestMessage(HttpMethod.Get, uri.ToString())) 758using (var request = new HttpRequestMessage(HttpMethod.Get, uri.ToString())) 831using (var request = new HttpRequestMessage(HttpMethod.Get, uri.ToString()))
Microsoft.Build.Tasks.UnitTests (3)
DownloadFile_Tests.cs (3)
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.Build.Tasks.Feed (1)
src\CreateAzureDevOpsFeed.cs (1)
148using HttpRequestMessage createFeedMessage = new HttpRequestMessage(HttpMethod.Post, $"{AzureDevOpsProject}/_apis/packaging/feeds");
Microsoft.DotNet.Deployment.Tasks.Links (1)
Microsoft.DotNet.Git.IssueManager (1)
Clients\AzureDevOpsClient.cs (1)
34HttpRequestMessage getMessage = new HttpRequestMessage(HttpMethod.Get, $"_apis/git/repositories/{repoName}/commits?searchCriteria.ids={commit}");
Microsoft.DotNet.Helix.Sdk (10)
AzureDevOpsTask.cs (2)
121protected async Task HandleFailedRequest(HttpRequestMessage req, HttpResponseMessage res) 146protected async Task<JObject> ParseResponseAsync(HttpRequestMessage req, HttpResponseMessage res)
CheckAzurePipelinesTestResults.cs (4)
58using var req = new HttpRequestMessage( 112using var req = new HttpRequestMessage( 164using (var req = new HttpRequestMessage( 208using (var req = new HttpRequestMessage(
CreateFailedTestsForFailedWorkItems.cs (1)
38var req =
FindDotNetCliPackage.cs (1)
266using var req = new HttpRequestMessage(HttpMethod.Head, uri);
StartAzurePipelinesTestRun.cs (1)
33var req =
StopAzurePipelinesTestRun.cs (1)
28using (var req =
Microsoft.DotNet.Internal.SymbolHelper (4)
SymbolPromotionHelper.cs (3)
146using HttpRequestMessage registerRequest = new(HttpMethod.Post, url) 200using HttpRequestMessage statusRequest = new(HttpMethod.Get, requestSpecificEndpoint) 263using HttpRequestMessage statusRequest = new(HttpMethod.Patch, requestSpecificEndpoint)
SymbolUploadHelperFactory.cs (1)
150using HttpRequestMessage getToolRequest = new(HttpMethod.Get, downloadUri) { Headers = { Accept = { new ("application/zip") } } };
Microsoft.DotNet.VersionTools (4)
Automation\GitHubApi\GitHubClient.cs (3)
209HttpRequestMessage request = new HttpRequestMessage(new HttpMethod("PATCH"), url); 372HttpRequestMessage request = new HttpRequestMessage(new HttpMethod("POST"), url) 396HttpRequestMessage request = new HttpRequestMessage(new HttpMethod("PATCH"), url)
Automation\VstsApi\VstsAdapterClient.cs (1)
169var request = new HttpRequestMessage(new HttpMethod("PATCH"), url)
Microsoft.Extensions.Http (27)
HttpMessageHandlerBuilder.cs (1)
73/// of sending an <see cref="HttpRequestMessage"/> and receiving an <see cref="HttpResponseMessage"/>.
Logging\HttpClientLoggerHandler.cs (2)
25protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 65protected override HttpResponseMessage Send(HttpRequestMessage request, CancellationToken cancellationToken)
Logging\IHttpClientAsyncLogger.cs (5)
17/// <see cref="HttpClient.SendAsync(HttpRequestMessage, CancellationToken)"/>), and their 23/// However, the implementation should be mindful about potential adverse side effects of accessing some of the <see cref="HttpRequestMessage"/> or 40ValueTask<object?> LogRequestStartAsync(HttpRequestMessage request, CancellationToken cancellationToken = default); 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 (4)
15/// However, the implementation should be mindful about potential adverse side effects of accessing some of the <see cref="HttpRequestMessage"/> or 30object? LogRequestStart(HttpRequestMessage request); 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 (6)
49private Task<HttpResponseMessage> SendCoreAsync(HttpRequestMessage request, bool useAsync, CancellationToken cancellationToken) 54async Task<HttpResponseMessage> Core(HttpRequestMessage request, bool useAsync, CancellationToken cancellationToken) 85/// <remarks>Logs the request to and response from the sent <see cref="HttpRequestMessage"/>.</remarks> 86protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 91/// <remarks>Logs the request to and response from the sent <see cref="HttpRequestMessage"/>.</remarks> 92protected override HttpResponseMessage Send(HttpRequestMessage request, CancellationToken cancellationToken)
Logging\LoggingScopeHttpMessageHandler.cs (6)
48private Task<HttpResponseMessage> SendCoreAsync(HttpRequestMessage request, bool useAsync, CancellationToken cancellationToken) 53async Task<HttpResponseMessage> Core(HttpRequestMessage request, bool useAsync, CancellationToken cancellationToken) 86/// <remarks>Logs the request to and response from the sent <see cref="HttpRequestMessage"/>.</remarks> 87protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 92/// <remarks>Logs the request to and response from the sent <see cref="HttpRequestMessage"/>.</remarks> 93protected override HttpResponseMessage Send(HttpRequestMessage request, CancellationToken cancellationToken)
Logging\LogHelper.cs (3)
95public static void LogRequestStart(this ILogger logger, HttpRequestMessage request, Func<string, bool> shouldRedactHeaderValue) 132public static IDisposable? BeginRequestPipelineScope(this ILogger logger, HttpRequestMessage request, out string? formattedUri) 138public static void LogRequestPipelineStart(this ILogger logger, HttpRequestMessage request, string? formattedUri, Func<string, bool> shouldRedactHeaderValue)
Microsoft.Extensions.Http.Diagnostics (30)
Http\DownstreamDependencyMetadataManager.cs (1)
41public RequestMetadata? GetRequestMetadata(HttpRequestMessage requestMessage)
Http\HttpDiagnosticsHttpRequestMessageExtensions.cs (4)
20/// <param name="request"><see cref="HttpRequestMessage"/> object.</param> 22public static void SetRequestMetadata(this HttpRequestMessage request, RequestMetadata metadata) 37/// <param name="request"><see cref="HttpRequestMessage"/> object.</param> 39public static RequestMetadata? GetRequestMetadata(this HttpRequestMessage request)
Latency\Internal\HttpClientLatencyLogEnricher.cs (1)
35public void Enrich(IEnrichmentTagCollector collector, HttpRequestMessage request, HttpResponseMessage? response, Exception? exception)
Latency\Internal\HttpLatencyTelemetryHandler.cs (1)
43protected async override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Logging\IHttpClientLogEnricher.cs (2)
19/// <param name="request"><see cref="HttpRequestMessage"/> object associated with the outgoing HTTP request.</param> 26void Enrich(IEnrichmentTagCollector collector, HttpRequestMessage request, HttpResponseMessage? response, Exception? exception);
Logging\Internal\HttpClientLogger.cs (8)
69public async ValueTask<object?> LogRequestStartAsync(HttpRequestMessage request, CancellationToken cancellationToken = default) 114HttpRequestMessage request, 122HttpRequestMessage request, 129public object? LogRequestStart(HttpRequestMessage request) 132public void LogRequestStop(object? context, HttpRequestMessage request, HttpResponseMessage response, TimeSpan elapsed) 135public void LogRequestFailed(object? context, HttpRequestMessage request, HttpResponseMessage? response, Exception exception, TimeSpan elapsed) 155HttpRequestMessage request, 224HttpRequestMessage request, HttpResponseMessage? response, Exception? exception)
Logging\Internal\HttpHeadersReader.cs (1)
41public void ReadRequestHeaders(HttpRequestMessage request, List<KeyValuePair<string, string>>? destination)
Logging\Internal\HttpRequestBodyReader.cs (3)
47public ValueTask<string> ReadAsync(HttpRequestMessage request, CancellationToken cancellationToken) 68private static async ValueTask<string> ReadFromStreamWithTimeoutAsync(HttpRequestMessage request, 86private static async ValueTask<string> ReadFromStreamAsync(HttpRequestMessage request, int readSizeLimit,
Logging\Internal\HttpRequestReader.cs (2)
96public async Task ReadRequestAsync(LogRecord logRecord, HttpRequestMessage request, 134private void GetRedactedPathAndParameters(HttpRequestMessage request, LogRecord logRecord)
Logging\Internal\IDownstreamDependencyMetadataManager.cs (1)
20RequestMetadata? GetRequestMetadata(HttpRequestMessage requestMessage);
Logging\Internal\IHttpHeadersReader.cs (2)
17/// <param name="request">An instance of <see cref="HttpRequestMessage"/> to read headers from.</param> 19void ReadRequestHeaders(HttpRequestMessage request, List<KeyValuePair<string, string>>? destination);
Logging\Internal\IHttpRequestReader.cs (3)
12/// Methods to read <see cref="HttpResponseMessage"/> or <see cref="HttpRequestMessage"/>. 29/// Reads <see cref="HttpRequestMessage"/>. 36Task ReadRequestAsync(LogRecord record, HttpRequestMessage request,
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 (7)
BenchEnricher.cs (1)
15public void Enrich(IEnrichmentTagCollector collector, HttpRequestMessage request, HttpResponseMessage? response, Exception? exception)
Benchmarks\HeadersReaderBenchmark.cs (1)
29public HttpRequestMessage? Request { get; set; }
Benchmarks\HugeHttpCLientLoggingBenchmark.cs (1)
17private static HttpRequestMessage Request => new(HttpMethod.Post, "https://www.microsoft.com");
Benchmarks\MediumHttpClientLoggingBenchmark.cs (1)
17private static HttpRequestMessage Request => new(HttpMethod.Post, "https://www.microsoft.com");
Benchmarks\SmallHttpClientLoggingBenchmark.cs (1)
17private static HttpRequestMessage Request => new(HttpMethod.Post, "https://www.microsoft.com");
NoRemoteCallHandler.cs (1)
35protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
NoRemoteCallNotSeekableHandler.cs (1)
38protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Microsoft.Extensions.Http.Diagnostics.Tests (79)
Latency\Internal\HttpLatencyTelemetryHandlerTest.cs (3)
57using var req = new HttpRequestMessage 67ItExpr.IsAny<HttpRequestMessage>(), 68ItExpr.IsAny<CancellationToken>()).Callback<HttpRequestMessage, CancellationToken>((req, _) =>
Logging\AcceptanceTests.cs (13)
107using var httpRequestMessage = new HttpRequestMessage 162using var httpRequestMessage = new HttpRequestMessage 178using var httpRequestMessage2 = new HttpRequestMessage 195private static async Task<string> SendRequest(HttpClient httpClient, HttpRequestMessage httpRequestMessage) 243using var httpRequestMessage = new HttpRequestMessage 265using var httpRequestMessage2 = new HttpRequestMessage 308using var httpRequestMessage = new HttpRequestMessage 355using var httpRequestMessage = new HttpRequestMessage 420using var httpRequestMessage = new HttpRequestMessage 591using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, _unreachableRequestUri); 617using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, _unreachableRequestUri); 640using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, _unreachableRequestUri); 679using var httpRequestMessage = new HttpRequestMessage
Logging\HttpClientLoggerTest.cs (28)
83using var httpRequestMessage = new HttpRequestMessage 121using var httpRequestMessage = new HttpRequestMessage 131It.IsAny<HttpRequestMessage>(), 183using var httpRequestMessage = new HttpRequestMessage 279using var httpRequestMessage = new HttpRequestMessage 384using var httpRequestMessage = new HttpRequestMessage 480using var httpRequestMessage = new HttpRequestMessage 528It.IsAny<HttpRequestMessage>(), 531.Returns((LogRecord a, HttpRequestMessage b, List<KeyValuePair<string, string>> c, CancellationToken d) => 595using var httpRequestMessage = new HttpRequestMessage 687using var httpRequestMessage = new HttpRequestMessage 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)); 730using var httpRequestMessage = new HttpRequestMessage 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>())) 768using var httpRequestMessage = new HttpRequestMessage 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>())) 812using var httpRequestMessage = new HttpRequestMessage 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)); 862using var httpRequestMessage = new HttpRequestMessage 957using var httpRequestMessage = new HttpRequestMessage 982using var httpRequestMessage = new HttpRequestMessage(); 1001using var httpRequestMessage = new HttpRequestMessage();
Logging\HttpHeadersReaderTest.cs (4)
23using var httpRequest = new HttpRequestMessage(); 41using var httpRequest = new HttpRequestMessage(); 136using var httpRequest = new HttpRequestMessage { Content = requestContent }; 177using var httpRequest = new HttpRequestMessage();
Logging\HttpRequestBodyReaderTest.cs (9)
39using var httpRequest = new HttpRequestMessage 59using var httpRequest = new HttpRequestMessage 83using var httpRequest = new HttpRequestMessage 104using var httpRequest = new HttpRequestMessage 132using var httpRequest = new HttpRequestMessage 156using var httpRequest = new HttpRequestMessage 183using var httpRequest = new HttpRequestMessage 209using var httpRequest = new HttpRequestMessage 230using var httpRequest = new HttpRequestMessage
Logging\HttpRequestReaderTest.cs (8)
80using var httpRequestMessage = new HttpRequestMessage 143using var httpRequestMessage = new HttpRequestMessage 206using var httpRequestMessage = new HttpRequestMessage 281using var httpRequestMessage = new HttpRequestMessage 353using var httpRequestMessage = new HttpRequestMessage 411using var httpRequestMessage = new HttpRequestMessage 482using var httpRequestMessage = new HttpRequestMessage 549using var httpRequestMessage = new HttpRequestMessage
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)
28HttpRequestMessage request,
Logging\Internal\NoRemoteCallHandler.cs (1)
29protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
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);
Telemetry\DownstreamDependencyMetadataManagerTests.cs (2)
48using var requestMessage = new HttpRequestMessage 68using var requestMessage = new HttpRequestMessage
Microsoft.Extensions.Http.Polly (21)
DependencyInjection\PollyHttpClientBuilderExtensions.cs (6)
63Func<HttpRequestMessage, IAsyncPolicy<HttpResponseMessage>> policySelector) 95Func<IServiceProvider, HttpRequestMessage, IAsyncPolicy<HttpResponseMessage>> policySelector) 167Func<IReadOnlyPolicyRegistry<string>, HttpRequestMessage, IAsyncPolicy<HttpResponseMessage>> policySelector) 244/// <param name="keySelector">A delegate used to generate a policy key based on the <see cref="HttpRequestMessage"/>.</param> 254public static IHttpClientBuilder AddPolicyHandler(this IHttpClientBuilder builder, Func<IServiceProvider, HttpRequestMessage, string, IAsyncPolicy<HttpResponseMessage>> policyFactory, Func<HttpRequestMessage, string> keySelector)
HttpRequestMessageExtensions.cs (7)
11/// Extension methods for <see cref="HttpRequestMessage"/> Polly integration. 20/// Gets the <see cref="Context"/> associated with the provided <see cref="HttpRequestMessage"/>. 22/// <param name="request">The <see cref="HttpRequestMessage"/>.</param> 29public static Context? GetPolicyExecutionContext(this HttpRequestMessage request) 41/// Sets the <see cref="Context"/> associated with the provided <see cref="HttpRequestMessage"/>. 43/// <param name="request">The <see cref="HttpRequestMessage"/>.</param> 50public static void SetPolicyExecutionContext(this HttpRequestMessage request, Context? context)
PolicyHttpMessageHandler.cs (8)
69/// The <see cref="PolicyHttpMessageHandler"/> will attach a context to the <see cref="HttpRequestMessage"/> prior 78private readonly Func<HttpRequestMessage, IAsyncPolicy<HttpResponseMessage>> _policySelector; 97/// <param name="policySelector">A function which can select the desired policy for a given <see cref="HttpRequestMessage"/>.</param> 98public PolicyHttpMessageHandler(Func<HttpRequestMessage, IAsyncPolicy<HttpResponseMessage>> policySelector) 109protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 147/// <param name="request">The <see cref="HttpRequestMessage"/>.</param> 151protected virtual async Task<HttpResponseMessage> SendCoreAsync(HttpRequestMessage request, Context context, CancellationToken cancellationToken) 177private IAsyncPolicy<HttpResponseMessage> SelectPolicy(HttpRequestMessage request)
Microsoft.Extensions.Http.Polly.Tests (23)
DependencyInjection\PollyHttpClientBuilderExtensionsTest.cs (5)
366var request = new HttpRequestMessage(HttpMethod.Get, "http://host1/Service1/"); 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)
HttpRequestMessageExtensionsTest.cs (5)
16var request = new HttpRequestMessage(); 35var request = new HttpRequestMessage(); 48var request = new HttpRequestMessage(); 66var request = new HttpRequestMessage(); 87var request = new HttpRequestMessage();
PolicyHttpMessageHandlerTest.cs (13)
64var expectedRequest = new HttpRequestMessage(); 66HttpRequestMessage policySelectorRequest = null; 288var request = new HttpRequestMessage(); 318var request = new HttpRequestMessage(); 339var request = new HttpRequestMessage(); 365var request = new HttpRequestMessage(); 402var request = new HttpRequestMessage(); 414public Func<HttpRequestMessage, Context, CancellationToken, Task<HttpResponseMessage>> OnSendAsync { get; set; } 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 (39)
Hedging\HttpStandardHedgingResilienceOptions.cs (1)
32/// <see cref="StandardHedgingHandlerBuilderExtensions.SelectPipelineBy(IStandardHedgingHandlerBuilder, Func{IServiceProvider, Func{System.Net.Http.HttpRequestMessage, string}})"/> extensions.
Hedging\Internals\RequestMessageSnapshotStrategy.cs (2)
13/// This strategy creates a snapshot of <see cref="HttpRequestMessage"/> before executing the hedging to prevent race conditions when cloning and modifying the message at the same time. 23HttpRequestMessage? request = context.GetRequestMessage();
Hedging\ResilienceHttpClientBuilderExtensions.Hedging.cs (1)
91var requestMessage = snapshot.CreateRequestMessage();
Hedging\StandardHedgingHandlerBuilderExtensions.cs (1)
96public static IStandardHedgingHandlerBuilder SelectPipelineBy(this IStandardHedgingHandlerBuilder builder, Func<IServiceProvider, Func<HttpRequestMessage, string>> selectorFactory)
Internal\RequestMessageSnapshot.cs (4)
25public static RequestMessageSnapshot Create(HttpRequestMessage request) 32public HttpRequestMessage CreateRequestMessage() 34var clone = new HttpRequestMessage(_method!, _requestUri) 74private void Initialize(HttpRequestMessage request)
Internal\ResilienceKeys.cs (1)
13public static readonly ResiliencePropertyKey<HttpRequestMessage?> RequestMessage = new("Resilience.Http.RequestMessage");
Resilience\HttpResilienceContextExtensions.cs (2)
29public static HttpRequestMessage? GetRequestMessage(this ResilienceContext context) 41public static void SetRequestMessage(this ResilienceContext context, HttpRequestMessage? requestMessage)
Resilience\HttpResilienceHttpRequestMessageExtensions.cs (3)
10/// The resilience extensions for <see cref="HttpRequestMessage"/>. 25public static ResilienceContext? GetResilienceContext(this HttpRequestMessage requestMessage) 49public static void SetResilienceContext(this HttpRequestMessage requestMessage, ResilienceContext? resilienceContext)
Resilience\HttpResiliencePipelineBuilderExtensions.cs (1)
37public static IHttpResiliencePipelineBuilder SelectPipelineBy(this IHttpResiliencePipelineBuilder builder, Func<IServiceProvider, Func<HttpRequestMessage, string>> selectorFactory)
Resilience\HttpStandardResiliencePipelineBuilderExtensions.cs (1)
98public static IHttpStandardResiliencePipelineBuilder SelectPipelineBy(this IHttpStandardResiliencePipelineBuilder builder, Func<IServiceProvider, Func<HttpRequestMessage, string>> selectorFactory)
Resilience\Internal\ByAuthorityPipelineKeyProvider.cs (1)
14public string GetPipelineKey(HttpRequestMessage requestMessage)
Resilience\Internal\PipelineKeyOptions.cs (1)
14public Func<HttpRequestMessage, string>? KeyProvider { get; set; }
Resilience\Internal\PipelineKeyProviderHelper.cs (3)
21public static void SelectPipelineBy(IServiceCollection services, string pipelineName, Func<IServiceProvider, Func<HttpRequestMessage, string>> selectorFactory) 26public static Func<HttpRequestMessage, string>? GetPipelineKeyProvider(this IServiceProvider provider, string pipelineName) 31private static void UsePipelineKeyProvider(IServiceCollection services, string pipelineName, Func<IServiceProvider, Func<HttpRequestMessage, string>> factory)
Resilience\ResilienceHandler.cs (13)
23private readonly Func<HttpRequestMessage, ResiliencePipeline<HttpResponseMessage>> _pipelineProvider; 30public ResilienceHandler(Func<HttpRequestMessage, ResiliencePipeline<HttpResponseMessage>> pipelineProvider) 53protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 68HttpRequestMessage request = GetRequestMessage(context, state.request); 112protected override HttpResponseMessage Send(HttpRequestMessage request, CancellationToken cancellationToken) 127HttpRequestMessage request = GetRequestMessage(context, state.request); 146private static ResilienceContext GetOrSetResilienceContext(HttpRequestMessage request, CancellationToken cancellationToken, out bool created) 160private static void TrySetRequestMetadata(ResilienceContext context, HttpRequestMessage request) 168private static HttpRequestMessage GetRequestMessage(ResilienceContext context, HttpRequestMessage request) 171private static void RestoreResilienceContext(ResilienceContext context, HttpRequestMessage request, bool created) 185private Task<HttpResponseMessage> SendCoreAsync(HttpRequestMessage requestMessage, CancellationToken cancellationToken) 189private HttpResponseMessage SendCore(HttpRequestMessage requestMessage, CancellationToken cancellationToken)
Resilience\ResilienceHttpClientBuilderExtensions.Resilience.cs (3)
78private static Func<HttpRequestMessage, ResiliencePipeline<HttpResponseMessage>> CreatePipelineSelector(IServiceProvider serviceProvider, string pipelineName) 100private static void TouchPipelineKey(Func<HttpRequestMessage, string> provider) 105using var request = new HttpRequestMessage(HttpMethod.Get, "https://localhost:123");
Routing\Internal\RoutingResilienceStrategy.cs (1)
30HttpRequestMessage? request = context.GetRequestMessage();
Microsoft.Extensions.Http.Resilience.PerformanceTests (8)
EmptyHandler.cs (1)
12protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
HedgingBenchmark.cs (1)
16private static HttpRequestMessage Request => new(HttpMethod.Post, _uri);
HttpResilienceBenchmark.cs (2)
23private static HttpRequestMessage Request 27var request = new HttpRequestMessage(HttpMethod.Post, _uri);
NoRemoteCallHandler.cs (2)
26protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 33protected override HttpResponseMessage Send(HttpRequestMessage request, CancellationToken cancellationToken)
RetryBenchmark.cs (1)
25private static HttpRequestMessage Request => new(HttpMethod.Post, _uri);
StandardResilienceBenchmark.cs (1)
25private static HttpRequestMessage Request => new(HttpMethod.Post, _uri);
Microsoft.Extensions.Http.Resilience.Tests (51)
Hedging\HedgingTests.cs (11)
83using var request = new HttpRequestMessage(HttpMethod.Get, "https://to-be-replaced:1234/some-path?query"); 123using var request = new HttpRequestMessage(HttpMethod.Get, "https://to-be-replaced:1234/some-path?query"); 142using var request = new HttpRequestMessage(HttpMethod.Get, "https://to-be-replaced:1234/some-path?query"); 164using var request = new HttpRequestMessage(HttpMethod.Get, "https://to-be-replaced:1234/some-path?query"); 189using var request = new HttpRequestMessage(HttpMethod.Get, "https://to-be-replaced:1234/some-path?query"); 213using var request = new HttpRequestMessage(HttpMethod.Get, "https://to-be-replaced:1234/some-path?query"); 237using var request = new HttpRequestMessage(HttpMethod.Get, "https://to-be-replaced:1234/some-path?query"); 265using var request = new HttpRequestMessage(HttpMethod.Get, "https://to-be-replaced:1234/some-path?query"); 289using var request = new HttpRequestMessage(HttpMethod.Get, "https://to-be-replaced:1234/some-path?query"); 309HttpClient client, HttpRequestMessage request, bool asynchronous, CancellationToken cancellationToken = default) 348private Task<HttpResponseMessage> InnerHandlerFunction(HttpRequestMessage request, CancellationToken cancellationToken)
Hedging\StandardHedgingTests.cs (9)
121using var request = new HttpRequestMessage(); 223using var request = new HttpRequestMessage(HttpMethod.Get, "https://key:80/discarded"); 240var requests = new List<HttpRequestMessage>(); 256using var firstRequest = new HttpRequestMessage(HttpMethod.Get, "https://to-be-replaced:1234/some-path?query"); 263using var secondRequest = new HttpRequestMessage(HttpMethod.Get, "https://to-be-replaced:1234/some-path?query"); 291using var request = new HttpRequestMessage(HttpMethod.Get, "https://some-endpoint:1234/some-path?query"); 338using var request = new HttpRequestMessage(HttpMethod.Get, $"https://{FailingEndpoint}:3000"); 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)
22using var request = new HttpRequestMessage();
Resilience\HttpClientBuilderExtensionsTests.BySelector.cs (3)
38using var request = new HttpRequestMessage(HttpMethod.Head, url); 53using var request = new HttpRequestMessage(); 84using var request = new HttpRequestMessage(HttpMethod.Head, url);
Resilience\HttpClientBuilderExtensionsTests.Standard.cs (2)
41using var request = new HttpRequestMessage(HttpMethod.Get, url); 228var requests = new List<HttpRequestMessage>();
Resilience\HttpResilienceContextExtensionsTests.cs (5)
42using var request = new HttpRequestMessage(); 52using var request = new HttpRequestMessage(); 63Assert.True(context.Properties.TryGetValue(ResilienceKeys.RequestMessage, out HttpRequestMessage? request)); 71using var request = new HttpRequestMessage(); 74Assert.True(context.Properties.TryGetValue(ResilienceKeys.RequestMessage, out HttpRequestMessage? actualRequest));
Resilience\RequestMessageSnapshotTests.cs (9)
21var initialRequest = new HttpRequestMessage 36using var request = CreateRequest(); 38var cloned = snapshot.CreateRequestMessage(); 45using var request = CreateRequest(); 49var cloned = snapshot.CreateRequestMessage(); 53private static HttpRequestMessage CreateRequest() 55var initialRequest = new HttpRequestMessage 76private static void AssertClonedMessage(HttpRequestMessage initialRequest, HttpRequestMessage cloned)
Resilience\ResilienceHandlerTest.cs (6)
30using var request = new HttpRequestMessage(); 68using var request = new HttpRequestMessage(); 100using var request = new HttpRequestMessage(); 131using var request = new HttpRequestMessage(); 155using var request = new HttpRequestMessage(); 164HttpRequestMessage request,
Routing\RoutingResilienceStrategyTests.cs (1)
37using var request = new HttpRequestMessage();
Microsoft.Extensions.Logging.AzureAppServices (3)
BlobAppendReferenceWrapper.cs (3)
35var message = new HttpRequestMessage(HttpMethod.Put, _appendUri) 49var message = new HttpRequestMessage(HttpMethod.Put, _fullUri) 75private static void AddCommonHeaders(HttpRequestMessage message)
Microsoft.Extensions.ML (1)
ModelLoaders\UriModelLoader.cs (1)
109var headRequest = new HttpRequestMessage(HttpMethod.Head, uri);
Microsoft.Extensions.ServiceDiscovery (4)
Http\HttpServiceEndpointResolver.cs (2)
31/// <exception cref="InvalidOperationException">The request had no <see cref="HttpRequestMessage.RequestUri"/> set or a suitable endpoint could not be found.</exception> 32public async ValueTask<ServiceEndpoint> GetEndpointAsync(HttpRequestMessage request, CancellationToken cancellationToken)
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.Extensions.ServiceDiscovery.Tests (1)
ServiceEndpointResolverTests.cs (1)
198var httpRequest = new HttpRequestMessage(HttpMethod.Get, "http://basket");
netstandard (1)
netstandard.cs (1)
1131[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.Http.HttpRequestMessage))]
ServerComparison.FunctionalTests (6)
ResponseCompressionTests.cs (2)
167var request = new HttpRequestMessage(HttpMethod.Get, "NoAppCompression"); 199var request = new HttpRequestMessage(HttpMethod.Get, url);
ResponseTests.cs (4)
129var requestMessage = new HttpRequestMessage(HttpMethod.Get, "contentlength") 174var requestMessage = new HttpRequestMessage(HttpMethod.Get, "connectionclose") 199var requestMessage = new HttpRequestMessage(HttpMethod.Get, "chunked") 224var requestMessage = new HttpRequestMessage(HttpMethod.Get, "manuallychunked")
SocialSample (2)
Startup.cs (2)
137var request = new HttpRequestMessage(HttpMethod.Get, context.Options.UserInformationEndpoint); 198var request = new HttpRequestMessage(HttpMethod.Get, context.Options.UserInformationEndpoint);
Stress.AppHost (1)
ResourceBuilderExtensions.cs (1)
63var request = new HttpRequestMessage(method, uri);
System.Net.Http (184)
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 (25)
56private static Activity? StartActivity(HttpRequestMessage request) 76internal override ValueTask<HttpResponseMessage> SendAsync(HttpRequestMessage request, bool async, CancellationToken cancellationToken) 90private async ValueTask<HttpResponseMessage> SendAsyncCore(HttpRequestMessage request, bool async, CancellationToken cancellationToken) 255[DynamicDependency(nameof(HttpRequestMessage.RequestUri), typeof(HttpRequestMessage))] 256[DynamicDependency(nameof(HttpRequestMessage.Method), typeof(HttpRequestMessage))] 259internal ActivityStartData(HttpRequestMessage request) 264public HttpRequestMessage Request { get; } 271internal ActivityStopData(HttpResponseMessage? response, HttpRequestMessage request, TaskStatus requestTaskStatus) 279public HttpRequestMessage Request { get; } 288[DynamicDependency(nameof(HttpRequestMessage.RequestUri), typeof(HttpRequestMessage))] 289[DynamicDependency(nameof(HttpRequestMessage.Method), typeof(HttpRequestMessage))] 294internal ExceptionData(Exception exception, HttpRequestMessage request) 301public HttpRequestMessage Request { get; } 309[DynamicDependency(nameof(HttpRequestMessage.RequestUri), typeof(HttpRequestMessage))] 310[DynamicDependency(nameof(HttpRequestMessage.Method), typeof(HttpRequestMessage))] 313internal RequestData(HttpRequestMessage request, Guid loggingRequestId, long timestamp) 320public HttpRequestMessage Request { get; } 346private void InjectHeaders(Activity currentActivity, HttpRequestMessage request) 350if (carrier is HttpRequestMessage request &&
System\Net\Http\HttpClient.cs (30)
29private Version _defaultRequestVersion = HttpRequestMessage.DefaultRequestVersion; 30private HttpVersionPolicy _defaultVersionPolicy = HttpRequestMessage.DefaultVersionPolicy; 64/// Gets or sets the default value of <see cref="HttpRequestMessage.VersionPolicy" /> for implicitly created requests in convenience methods, 68/// Note that this property has no effect on any of the <see cref="Send(HttpRequestMessage)" /> and <see cref="SendAsync(HttpRequestMessage)" /> overloads 69/// since they accept fully initialized <see cref="HttpRequestMessage" />. 170HttpRequestMessage request = CreateRequestMessage(HttpMethod.Get, requestUri); 178private async Task<string> GetStringAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken) 245HttpRequestMessage request = CreateRequestMessage(HttpMethod.Get, requestUri); 253private async Task<byte[]> GetByteArrayAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken) 324HttpRequestMessage request = CreateRequestMessage(HttpMethod.Get, requestUri); 332private async Task<Stream> GetStreamAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken) 398HttpRequestMessage request = CreateRequestMessage(HttpMethod.Post, requestUri); 414HttpRequestMessage request = CreateRequestMessage(HttpMethod.Put, requestUri); 430HttpRequestMessage request = CreateRequestMessage(HttpMethod.Patch, requestUri); 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) 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) 521HttpRequestMessage request, HttpCompletionOption completionOption, 559private void CheckRequestBeforeSend(HttpRequestMessage request) 580private static bool ShouldBufferResponse(HttpCompletionOption completionOption, HttpRequestMessage request) => 634private static bool StartSend(HttpRequestMessage request) 740private static void CheckRequestMessage(HttpRequestMessage request) 748private void PrepareRequestMessage(HttpRequestMessage request) 820private HttpRequestMessage CreateRequestMessage(HttpMethod method, Uri? uri) =>
System\Net\Http\HttpClientHandler.cs (5)
305public Func<HttpRequestMessage, X509Certificate2?, X509Chain?, SslPolicyErrors, bool>? ServerCertificateCustomValidationCallback 354protected internal override HttpResponseMessage Send(HttpRequestMessage request, CancellationToken cancellationToken) 364protected internal override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 371private static Func<HttpRequestMessage, X509Certificate2?, X509Chain?, SslPolicyErrors, bool>? s_dangerousAcceptAnyServerCertificateValidator; 373public static Func<HttpRequestMessage, X509Certificate2?, X509Chain?, SslPolicyErrors, bool> DangerousAcceptAnyServerCertificateValidator =>
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 (4)
32public virtual HttpResponseMessage Send(HttpRequestMessage request, CancellationToken cancellationToken) 64public virtual Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 77static async Task<HttpResponseMessage> SendAsyncWithTelemetry(HttpMessageHandler handler, HttpRequestMessage request, CancellationToken cancellationToken) 99private static bool ShouldSendWithTelemetry(HttpRequestMessage request) =>
System\Net\Http\HttpResponseMessage.cs (2)
20private HttpRequestMessage? _requestMessage; 130public HttpRequestMessage? RequestMessage
System\Net\Http\HttpTelemetry.cs (1)
53public void RequestStart(HttpRequestMessage request)
System\Net\Http\HttpVersionPolicy.cs (2)
16/// as well as a secure connection is being requested, the result is the <see cref="HttpRequestMessage.Version" />. 29/// Otherwise, downgrades to the <see cref="HttpRequestMessage.Version" />.
System\Net\Http\MessageProcessingHandler.cs (6)
25protected abstract HttpRequestMessage ProcessRequest(HttpRequestMessage request, 30protected internal sealed override HttpResponseMessage Send(HttpRequestMessage request, 36HttpRequestMessage newRequestMessage = ProcessRequest(request, cancellationToken); 42protected internal sealed override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, 55HttpRequestMessage newRequestMessage = ProcessRequest(request, cancellationToken);
System\Net\Http\Metrics\HttpMetricsEnrichmentContext.cs (9)
17/// Enrichment is done on per-request basis by callbacks registered with <see cref="AddCallback(HttpRequestMessage, Action{HttpMetricsEnrichmentContext})"/>. 32private HttpRequestMessage? _request; 40/// Gets the <see cref="HttpRequestMessage"/> that has been sent. 45public HttpRequestMessage Request => _request!; 48/// Gets the <see cref="HttpRequestMessage"/> received from the server or <see langword="null"/> if the request failed. 76/// <param name="request">The <see cref="HttpRequestMessage"/> to apply enrichment to.</param> 78public static void AddCallback(HttpRequestMessage request, Action<HttpMetricsEnrichmentContext> callback) 101internal static HttpMetricsEnrichmentContext? GetEnrichmentContextForRequest(HttpRequestMessage request) 111internal void RecordDurationWithEnrichment(HttpRequestMessage request,
System\Net\Http\Metrics\MetricsHandler.cs (5)
36internal override ValueTask<HttpResponseMessage> SendAsync(HttpRequestMessage request, bool async, CancellationToken cancellationToken) 50private async ValueTask<HttpResponseMessage> SendAsyncWithMetrics(HttpRequestMessage request, bool async, CancellationToken cancellationToken) 83private (long StartTimestamp, bool RecordCurrentRequests) RequestStart(HttpRequestMessage request) 97private void RequestStop(HttpRequestMessage request, HttpResponseMessage? response, Exception? exception, long startTimestamp, bool recordCurrentRequests) 135private static TagList InitializeCommonTags(HttpRequestMessage request)
System\Net\Http\SocketsHttpHandler\AuthenticationHelper.cs (7)
164private static void SetRequestAuthenticationHeaderValue(HttpRequestMessage request, AuthenticationHeaderValue headerValue, bool isProxyAuth) 176private static void SetBasicAuthToken(HttpRequestMessage request, NetworkCredential credential, bool isProxyAuth) 187private static async ValueTask<bool> TrySetDigestAuthToken(HttpRequestMessage request, NetworkCredential credential, DigestResponse digestResponse, 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) 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.Digest.cs (1)
39public static async Task<string?> GetDigestTokenForCredential(NetworkCredential credential, HttpRequestMessage request, DigestResponse digestResponse)
System\Net\Http\SocketsHttpHandler\AuthenticationHelper.NtAuth.cs (4)
51private static Task<HttpResponseMessage> InnerSendAsync(HttpRequestMessage request, bool async, bool isProxyAuth, HttpConnectionPool pool, HttpConnection connection, CancellationToken cancellationToken) 76private static async Task<HttpResponseMessage> SendWithNtAuthAsync(HttpRequestMessage request, Uri authUri, bool async, ICredentials credentials, TokenImpersonationLevel impersonationLevel, bool isProxyAuth, HttpConnection connection, HttpConnectionPool connectionPool, CancellationToken cancellationToken) 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\ConnectHelper.cs (8)
25public readonly Func<HttpRequestMessage, X509Certificate2?, X509Chain?, SslPolicyErrors, bool> FromHttpClientHandler; 28public CertificateCallbackMapper(Func<HttpRequestMessage, X509Certificate2?, X509Chain?, SslPolicyErrors, bool> fromHttpClientHandler) 32FromHttpClientHandler((HttpRequestMessage)sender, certificate as X509Certificate2, chain, sslPolicyErrors); 36private static SslClientAuthenticationOptions SetUpRemoteCertificateValidationCallback(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request) 44Func<HttpRequestMessage, X509Certificate2?, X509Chain?, SslPolicyErrors, bool> localFromHttpClientHandler = mapper.FromHttpClientHandler; 45HttpRequestMessage localRequest = request; 58public static async ValueTask<SslStream> EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, bool async, Stream stream, CancellationToken cancellationToken) 115public static async ValueTask<QuicConnection> ConnectQuicAsync(HttpRequestMessage request, DnsEndPoint endPoint, TimeSpan idleTimeout, SslClientAuthenticationOptions clientAuthenticationOptions, Action<QuicConnection, QuicStreamCapacityChangedArgs> streamCapacityCallback, CancellationToken cancellationToken)
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.cs (12)
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) 568private async ValueTask<(Stream, TransportContext?, Activity?, IPEndPoint?)> ConnectAsync(HttpRequestMessage request, bool async, CancellationToken cancellationToken) 660private async ValueTask<Stream> ConnectToTcpHostAsync(string host, int port, HttpRequestMessage initialRequest, bool async, CancellationToken cancellationToken) 721private SslClientAuthenticationOptions GetSslOptionsForRequest(HttpRequestMessage request) 738private async ValueTask<Stream> ApplyPlaintextFilterAsync(bool async, Stream stream, Version httpVersion, HttpRequestMessage request, CancellationToken cancellationToken) 784HttpRequestMessage tunnelRequest = new HttpRequestMessage(HttpMethod.Connect, _proxyUri); 811private async ValueTask<Stream> EstablishSocksTunnel(HttpRequestMessage request, bool async, CancellationToken cancellationToken) 843private static void ThrowGetVersionException(HttpRequestMessage request, int desiredVersion, Exception? inner = null)
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http1.cs (3)
35private bool TryGetPooledHttp11Connection(HttpRequestMessage request, bool async, [NotNullWhen(true)] out HttpConnection? connection, [NotNullWhen(false)] out HttpConnectionWaiter<HttpConnection>? waiter) 295internal async ValueTask<HttpConnection> CreateHttp11ConnectionAsync(HttpRequestMessage request, bool async, CancellationToken cancellationToken) 301private async ValueTask<HttpConnection> ConstructHttp11ConnectionAsync(bool async, Stream stream, TransportContext? transportContext, HttpRequestMessage request, Activity? activity, IPEndPoint? remoteEndPoint, CancellationToken cancellationToken)
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http2.cs (3)
64private bool TryGetPooledHttp2Connection(HttpRequestMessage request, [NotNullWhen(true)] out Http2Connection? connection, out HttpConnectionWaiter<Http2Connection?>? waiter) 247private async ValueTask<Http2Connection> ConstructHttp2ConnectionAsync(Stream stream, HttpRequestMessage request, Activity? activity, IPEndPoint? remoteEndPoint, CancellationToken cancellationToken) 290private async Task HandleHttp11Downgrade(HttpRequestMessage request, Stream stream, TransportContext? transportContext, Activity? activity, IPEndPoint? remoteEndPoint, CancellationToken cancellationToken)
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http3.cs (3)
68private async ValueTask<HttpResponseMessage?> TrySendUsingHttp3Async(HttpRequestMessage request, CancellationToken cancellationToken) 130private bool TryGetPooledHttp3Connection(HttpRequestMessage request, [NotNullWhen(true)] out Http3Connection? connection, [NotNullWhen(false)] out HttpConnectionWaiter<Http3Connection?>? waiter) 609private bool TryGetHttp3Authority(HttpRequestMessage request, [NotNullWhen(true)] out HttpAuthority? authority, out Exception? reasonException)
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionWaiter.cs (2)
20public ValueTask<T> WaitForConnectionAsync(HttpRequestMessage request, HttpConnectionPool pool, bool async, CancellationToken requestCancellationToken) 27private async ValueTask<T> WaitForConnectionWithTelemetryAsync(HttpRequestMessage request, HttpConnectionPool pool, bool async, CancellationToken requestCancellationToken)
System\Net\Http\SocketsHttpHandler\ConnectionPool\RequestQueue.cs (3)
14public HttpRequestMessage Request; 114public HttpConnectionWaiter<T> EnqueueRequest(HttpRequestMessage request) 122public void EnqueueRequest(HttpRequestMessage request, HttpConnectionWaiter<T> waiter)
System\Net\Http\SocketsHttpHandler\DecompressionHandler.cs (1)
52internal override async ValueTask<HttpResponseMessage> SendAsync(HttpRequestMessage request, bool async, CancellationToken cancellationToken)
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (5)
1411private int WriteHeaderCollection(HttpRequestMessage request, HttpHeaders headers, ref ArrayBuffer headerBuffer) 1415HeaderEncodingSelector<HttpRequestMessage>? encodingSelector = _pool.Settings._requestHeaderEncodingSelector; 1483private void WriteHeaders(HttpRequestMessage request, ref ArrayBuffer headerBuffer) 1620private async ValueTask<Http2Stream> SendHeadersAsync(HttpRequestMessage request, CancellationToken cancellationToken, bool mustFlush) 1983public async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, bool async, CancellationToken cancellationToken)
System\Net\Http\SocketsHttpHandler\Http2Stream.cs (2)
34private readonly HttpRequestMessage _request; 92public Http2Stream(HttpRequestMessage request, Http2Connection connection)
System\Net\Http\SocketsHttpHandler\Http3Connection.cs (1)
244public async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, long queueStartingTimestamp, Activity? waitForConnectionActivity, CancellationToken cancellationToken)
System\Net\Http\SocketsHttpHandler\Http3RequestStream.cs (4)
25private readonly HttpRequestMessage _request; 68public Http3RequestStream(HttpRequestMessage request, Http3Connection connection, QuicStream stream) 602private void BufferHeaders(HttpRequestMessage request) 715HeaderEncodingSelector<HttpRequestMessage>? encodingSelector = _connection.Pool.Settings._requestHeaderEncodingSelector;
System\Net\Http\SocketsHttpHandler\HttpAuthenticatedConnectionHandler.cs (1)
18internal override ValueTask<HttpResponseMessage> SendAsync(HttpRequestMessage request, bool async, CancellationToken cancellationToken)
System\Net\Http\SocketsHttpHandler\HttpConnection.cs (7)
48private HttpRequestMessage? _currentRequest; 309private void WriteHeaders(HttpRequestMessage request) 421HeaderEncodingSelector<HttpRequestMessage>? encodingSelector = _pool.Settings._requestHeaderEncodingSelector; 532public async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, bool async, CancellationToken cancellationToken) 942private HttpContentWriteStream CreateRequestContentStream(HttpRequestMessage request) 968private async ValueTask SendRequestContentAsync(HttpRequestMessage request, HttpContentWriteStream stream, bool async, CancellationToken cancellationToken) 995HttpRequestMessage request, Task<bool> allowExpect100ToContinueTask,
System\Net\Http\SocketsHttpHandler\HttpConnectionHandler.cs (1)
18internal override ValueTask<HttpResponseMessage> SendAsync(HttpRequestMessage request, bool async, CancellationToken cancellationToken)
System\Net\Http\SocketsHttpHandler\HttpConnectionPoolManager.cs (5)
256private HttpConnectionKey GetConnectionKey(HttpRequestMessage request, Uri? proxyUri, bool isProxyConnect) 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\HttpConnectionSettings.cs (2)
53internal HeaderEncodingSelector<HttpRequestMessage>? _requestHeaderEncodingSelector; 54internal HeaderEncodingSelector<HttpRequestMessage>? _responseHeaderEncodingSelector;
System\Net\Http\SocketsHttpHandler\HttpMessageHandlerStage.cs (3)
11protected internal sealed override HttpResponseMessage Send(HttpRequestMessage request, 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\Metrics\SocketsHttpHandlerMetrics.cs (1)
32public void RequestLeftQueue(HttpRequestMessage request, HttpConnectionPool pool, TimeSpan duration, int versionMajor)
System\Net\Http\SocketsHttpHandler\RedirectHandler.cs (1)
28internal override async ValueTask<HttpResponseMessage> SendAsync(HttpRequestMessage request, bool async, CancellationToken cancellationToken)
System\Net\Http\SocketsHttpHandler\SocketsHttpConnectionContext.cs (3)
12private readonly HttpRequestMessage _initialRequestMessage; 14internal SocketsHttpConnectionContext(DnsEndPoint dnsEndPoint, HttpRequestMessage initialRequestMessage) 28public HttpRequestMessage InitialRequestMessage => _initialRequestMessage;
System\Net\Http\SocketsHttpHandler\SocketsHttpHandler.cs (5)
434public HeaderEncodingSelector<HttpRequestMessage>? RequestHeaderEncodingSelector 448public HeaderEncodingSelector<HttpRequestMessage>? ResponseHeaderEncodingSelector 578protected internal override HttpResponseMessage Send(HttpRequestMessage request, 609protected internal override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 631private static Exception? ValidateAndNormalizeRequest(HttpRequestMessage request)
System\Net\Http\SocketsHttpHandler\SocketsHttpPlaintextStreamFilterContext.cs (3)
15private readonly HttpRequestMessage _initialRequestMessage; 17internal SocketsHttpPlaintextStreamFilterContext(Stream plaintextStream, Version negotiatedHttpVersion, HttpRequestMessage initialRequestMessage) 37public HttpRequestMessage InitialRequestMessage => _initialRequestMessage;
System.Net.Http.WinHttpHandler (2)
artifacts\obj\System.Net.Http.WinHttpHandler\Debug\net10.0\System.Net.Http.WinHttpHandler.notsupported.cs (2)
44public System.Func<System.Net.Http.HttpRequestMessage, System.Security.Cryptography.X509Certificates.X509Certificate2, System.Security.Cryptography.X509Certificates.X509Chain, System.Net.Security.SslPolicyErrors, bool>? ServerCertificateValidationCallback { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_WinHttpHandler); } set { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_WinHttpHandler); } } 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 (2)
System\Net\HttpWebRequest.cs (2)
49private HttpRequestMessage? _sendRequestMessage; 1285private void AddCacheControlHeaders(HttpRequestMessage request)
System.Net.WebSockets.Client (2)
System\Net\WebSockets\WebSocketHandle.Managed.cs (2)
79HttpRequestMessage request; 380private static string? AddWebSocketHeaders(HttpRequestMessage request, ClientWebSocketOptions options)
Templates.Blazor.Tests (4)
BlazorWebTemplateTest.cs (1)
85var request = new HttpRequestMessage(HttpMethod.Get, new Uri(aspNetProcess.ListeningUri, "/_framework/blazor.boot.json"));
src\ProjectTemplates\Shared\AspNetProcess.cs (3)
136var request = new HttpRequestMessage( 250internal Task<HttpResponseMessage> SendRequest(Func<HttpRequestMessage> requestFactory) 257var request = new HttpRequestMessage(
Templates.Blazor.WebAssembly.Auth.Tests (3)
src\ProjectTemplates\Shared\AspNetProcess.cs (3)
136var request = new HttpRequestMessage( 250internal Task<HttpResponseMessage> SendRequest(Func<HttpRequestMessage> requestFactory) 257var request = new HttpRequestMessage(
Templates.Blazor.WebAssembly.Tests (3)
src\ProjectTemplates\Shared\AspNetProcess.cs (3)
136var request = new HttpRequestMessage( 250internal Task<HttpResponseMessage> SendRequest(Func<HttpRequestMessage> requestFactory) 257var request = new HttpRequestMessage(
Templates.Mvc.Tests (3)
src\ProjectTemplates\Shared\AspNetProcess.cs (3)
136var request = new HttpRequestMessage( 250internal Task<HttpResponseMessage> SendRequest(Func<HttpRequestMessage> requestFactory) 257var request = new HttpRequestMessage(
Templates.Tests (3)
src\ProjectTemplates\Shared\AspNetProcess.cs (3)
136var request = new HttpRequestMessage( 250internal Task<HttpResponseMessage> SendRequest(Func<HttpRequestMessage> requestFactory) 257var request = new HttpRequestMessage(