942 instantiations of HttpRequestMessage
Aspire.Dashboard.Tests (12)
Aspire.Hosting.Redis (1)
AuthSamples.FunctionalTests (1)
Diagnostics.FunctionalTests (13)
dotnet-svcutil-lib (2)
GenerateRulesMissingDocumentation (1)
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)
IISExpress.FunctionalTests (6)
InMemory.FunctionalTests (7)
Interop.FunctionalTests (49)
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()}/");
Microsoft.AspNetCore.Authentication.Google (1)
Microsoft.AspNetCore.Authentication.MicrosoftAccount (1)
Microsoft.AspNetCore.Authentication.OAuth (1)
Microsoft.AspNetCore.Authentication.OpenIdConnect (3)
Microsoft.AspNetCore.Authentication.Test (19)
Microsoft.AspNetCore.Authentication.Twitter (1)
Microsoft.AspNetCore.CookiePolicy.Test (1)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (2)
Microsoft.AspNetCore.Diagnostics.Tests (4)
Microsoft.AspNetCore.HeaderPropagation.Tests (18)
Microsoft.AspNetCore.Http.Connections.Client (6)
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)
Microsoft.AspNetCore.HttpsPolicy.Tests (19)
Microsoft.AspNetCore.Identity.FunctionalTests (1)
Microsoft.AspNetCore.Identity.InMemory.Test (1)
Microsoft.AspNetCore.Localization.FunctionalTests (2)
Microsoft.AspNetCore.Mvc.FunctionalTests (354)
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);
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");
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");
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");
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");
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);
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);
Microsoft.AspNetCore.Mvc.Testing (1)
Microsoft.AspNetCore.OutputCaching.Tests (7)
Microsoft.AspNetCore.RequestDecompression.Tests (6)
Microsoft.AspNetCore.ResponseCaching.Tests (5)
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)
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, "/")
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)
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)
Microsoft.AspNetCore.SpaServices.Extensions (2)
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)
Microsoft.AspNetCore.StaticFiles.Tests (32)
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)
Microsoft.AspNetCore.TestHost.Tests (17)
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");
Microsoft.AspNetCore.Testing.Tests (2)
Microsoft.AspNetCore.WebSockets.Tests (7)
Microsoft.Build.Tasks.UnitTests (8)
Microsoft.DotNet.Build.Tasks.Feed (1)
Microsoft.DotNet.Deployment.Tasks.Links (1)
Microsoft.DotNet.Git.IssueManager (1)
Microsoft.DotNet.Helix.Sdk (8)
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)
Microsoft.DotNet.VersionTools (4)
Microsoft.Extensions.Http.Diagnostics.PerformanceTests (4)
Microsoft.Extensions.Http.Diagnostics.Tests (51)
Microsoft.Extensions.Http.Polly.Tests (30)
Microsoft.Extensions.Http.Resilience (2)
Microsoft.Extensions.Http.Resilience.PerformanceTests (4)
Microsoft.Extensions.Http.Resilience.Tests (31)
Microsoft.Extensions.Logging.AzureAppServices (2)
Microsoft.Extensions.ML (1)
Microsoft.Extensions.ServiceDiscovery.Tests (1)
Negotiate.Client (3)
ServerComparison.FunctionalTests (6)
SocialSample (2)
Stress.AppHost (1)
System.Net.Http (2)
System.Net.Requests (1)
System.Net.WebSockets.Client (2)
Templates.Blazor.Tests (3)
Templates.Blazor.WebAssembly.Auth.Tests (2)
Templates.Blazor.WebAssembly.Tests (2)
Templates.Mvc.Tests (2)
Templates.Tests (2)
1459 references to HttpRequestMessage
Aspire.Dashboard.Tests (12)
Aspire.Hosting (1)
Aspire.Hosting.Redis (1)
AuthSamples.FunctionalTests (1)
Binding.Http.IntegrationTests (2)
Binding.ReliableSession.IntegrationTests (2)
ClientSample (1)
Diagnostics.FunctionalTests (13)
dotnet-svcutil-lib (35)
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)
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)
IISExpress.FunctionalTests (6)
InMemory.FunctionalTests (7)
Interop.FunctionalTests (64)
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()}/");
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)
Microsoft.Analyzers.Local.Tests (1)
Microsoft.Arcade.Common (3)
Microsoft.Arcade.Test.Common (1)
Microsoft.AspNetCore.Authentication.Google (1)
Microsoft.AspNetCore.Authentication.MicrosoftAccount (1)
Microsoft.AspNetCore.Authentication.OAuth (1)
Microsoft.AspNetCore.Authentication.OpenIdConnect (3)
Microsoft.AspNetCore.Authentication.Test (31)
Microsoft.AspNetCore.Authentication.Twitter (1)
Microsoft.AspNetCore.Components.WebAssembly (29)
Microsoft.AspNetCore.CookiePolicy.Test (2)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (2)
Microsoft.AspNetCore.Diagnostics.Tests (4)
Microsoft.AspNetCore.HeaderPropagation (1)
Microsoft.AspNetCore.HeaderPropagation.Tests (7)
Microsoft.AspNetCore.Http.Connections.Client (10)
Microsoft.AspNetCore.Http.Connections.Tests (1)
Microsoft.AspNetCore.HttpLogging.Tests (5)
Microsoft.AspNetCore.HttpOverrides.Tests (6)
Microsoft.AspNetCore.HttpsPolicy.Tests (18)
Microsoft.AspNetCore.Identity.FunctionalTests (1)
Microsoft.AspNetCore.Identity.InMemory.Test (2)
Microsoft.AspNetCore.Identity.Test (1)
Microsoft.AspNetCore.Localization.FunctionalTests (2)
Microsoft.AspNetCore.Mvc.FunctionalTests (355)
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");
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");
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)
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");
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);
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);
Microsoft.AspNetCore.Mvc.Testing (11)
Microsoft.AspNetCore.OutputCaching.Tests (1)
Microsoft.AspNetCore.RequestDecompression.Tests (6)
Microsoft.AspNetCore.ResponseCaching.Tests (1)
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)
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");
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (6)
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)
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (2)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (7)
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (1)
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);
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)
Microsoft.AspNetCore.SpaServices.Extensions (3)
Microsoft.AspNetCore.SpaServices.Extensions.Tests (4)
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)
Microsoft.AspNetCore.StaticFiles.Tests (29)
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)
Microsoft.AspNetCore.TestHost.Tests (17)
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");
Microsoft.AspNetCore.Testing.Tests (4)
Microsoft.AspNetCore.WebSockets.Tests (8)
Microsoft.Build.Tasks.UnitTests (3)
Microsoft.DotNet.Build.Tasks.Feed (1)
Microsoft.DotNet.Deployment.Tasks.Links (1)
Microsoft.DotNet.Git.IssueManager (1)
Microsoft.DotNet.Helix.Sdk (10)
Microsoft.DotNet.Internal.SymbolHelper (4)
Microsoft.DotNet.VersionTools (4)
Microsoft.Extensions.Http (27)
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);
Microsoft.Extensions.Http.Diagnostics (30)
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)
Microsoft.Extensions.Http.Diagnostics.PerformanceTests (7)
Microsoft.Extensions.Http.Diagnostics.Tests (79)
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();
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)
Microsoft.Extensions.Http.Polly.Tests (23)
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)
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)
Microsoft.Extensions.Http.Resilience.PerformanceTests (8)
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)
Microsoft.Extensions.Logging.AzureAppServices (3)
Microsoft.Extensions.ML (1)
Microsoft.Extensions.ServiceDiscovery (4)
Microsoft.Extensions.ServiceDiscovery.Tests (1)
netstandard (1)
ServerComparison.FunctionalTests (6)
SocialSample (2)
Stress.AppHost (1)
System.Net.Http (184)
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\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.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\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.WinHttpHandler (2)
System.Net.Requests (2)
System.Net.WebSockets.Client (2)
Templates.Blazor.Tests (4)
Templates.Blazor.WebAssembly.Auth.Tests (3)
Templates.Blazor.WebAssembly.Tests (3)
Templates.Mvc.Tests (3)
Templates.Tests (3)