79 instantiations of HttpMethod
Aspire.Dashboard.Tests (1)
Integration\OtlpHttpServiceTests.cs (1)
260var requestMessage = new HttpRequestMessage(new HttpMethod(method), "/v1/logs");
AuthSamples.FunctionalTests (1)
HttpClientExtensions.cs (1)
47var submision = new HttpRequestMessage(new HttpMethod(submit.Method.ToString()), target)
dotnet-svcutil-lib (2)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpChannelFactory.cs (1)
1051_httpRequestMessage.Method = new HttpMethod(requestProperty.Method);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpRequestMessageProperty.cs (1)
297this.HttpRequestMessage.Method = new HttpMethod(value);
IIS.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestResponseTests.cs (1)
582var request = new HttpRequestMessage(new HttpMethod(method), _fixture.Client.BaseAddress + $"SetCustomErorCode?code={code}");
IISExpress.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestResponseTests.cs (1)
582var request = new HttpRequestMessage(new HttpMethod(method), _fixture.Client.BaseAddress + $"SetCustomErorCode?code={code}");
Microsoft.AspNetCore.Identity.FunctionalTests (1)
Extensions\HttpClientExtensions.cs (1)
49var submision = new HttpRequestMessage(new HttpMethod(submit.Method.ToString()), target)
Microsoft.AspNetCore.Mvc.FunctionalTests (45)
ApiExplorerTest.cs (2)
416new HttpMethod("PUT"), 439new HttpMethod("POST"),
BasicTests.cs (1)
225new HttpMethod(method),
CorsTests.cs (1)
16var request = new HttpRequestMessage(new HttpMethod("OPTIONS"), "http://localhost/NonCors/Post");
CorsTestsBase.cs (12)
44var request = new HttpRequestMessage(new HttpMethod(method), "http://localhost/Cors/GetBlogComments"); 64var request = new HttpRequestMessage(new HttpMethod("OPTIONS"), "http://localhost/NonCors/GetOptions"); 80var request = new HttpRequestMessage(new HttpMethod("OPTIONS"), "http://localhost/NonCors/GetOptions"); 98var request = new HttpRequestMessage(new HttpMethod("OPTIONS"), "http://localhost/NonCors/Post"); 118new HttpMethod(CorsConstants.PreflightHttpMethod), 187new HttpMethod(CorsConstants.PreflightHttpMethod), 247var request = new HttpRequestMessage(new HttpMethod(method), "http://localhost/Cors/GetExclusiveContent"); 272new HttpMethod(CorsConstants.PreflightHttpMethod), 298var request = new HttpRequestMessage(new HttpMethod(CorsConstants.PreflightHttpMethod), url); 330var request = new HttpRequestMessage(new HttpMethod(CorsConstants.PreflightHttpMethod), url); 368new HttpMethod(CorsConstants.PreflightHttpMethod), 393new HttpMethod(CorsConstants.PreflightHttpMethod),
FileResultTests.cs (4)
209var httpRequestMessage = new HttpRequestMessage(new HttpMethod(httpMethod), "http://localhost/DownloadFiles/DownloadFromDiskWithFileName"); 430var httpRequestMessage = new HttpRequestMessage(new HttpMethod(httpMethod), "http://localhost/DownloadFiles/DownloadFromStreamWithFileName"); 634var httpRequestMessage = new HttpRequestMessage(new HttpMethod(httpMethod), "http://localhost/DownloadFiles/DownloadFromBinaryDataWithFileName"); 784var httpRequestMessage = new HttpRequestMessage(new HttpMethod(httpMethod), "http://localhost/EmbeddedFiles/DownloadFileWithFileName_RangeProcessingNotEnabled");
JsonPatchInputFormatterTest.cs (1)
168Method = new HttpMethod("PATCH"),
RazorPagesTest.cs (1)
437var request = new HttpRequestMessage(new HttpMethod(httpMethod), url);
RoutingTests.cs (1)
36var response = await Client.SendAsync(new HttpRequestMessage(new HttpMethod("POST"), url));
RoutingTestsBase.cs (16)
401var request = new HttpRequestMessage(new HttpMethod(method), $"http://localhost{url}"); 454var request = new HttpRequestMessage(new HttpMethod(method), $"http://localhost{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"); 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 (6)
224var message = new HttpRequestMessage(new HttpMethod(method), "http://localhost/Tickets/5?version=" + version); 250var message = new HttpRequestMessage(new HttpMethod(method), "http://localhost/Tickets/5"); 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");
Microsoft.AspNetCore.OutputCaching.Tests (1)
TestUtils.cs (1)
271return new HttpRequestMessage(new HttpMethod(method), requestUri);
Microsoft.AspNetCore.ResponseCaching.Tests (1)
TestUtils.cs (1)
257return new HttpRequestMessage(new HttpMethod(method), requestUri);
Microsoft.AspNetCore.ResponseCompression.Tests (1)
ResponseCompressionMiddlewareTest.cs (1)
1278var request = new HttpRequestMessage(new HttpMethod(httpMethod), "");
Microsoft.AspNetCore.Routing.FunctionalTests (1)
RouterSampleTest.cs (1)
83var message = new HttpRequestMessage(new HttpMethod(httpVerb), "api/all/Joe/Duf");
Microsoft.AspNetCore.SpaServices.Extensions (1)
Proxying\SpaProxy.cs (1)
160requestMessage.Method = new HttpMethod(request.Method);
Microsoft.AspNetCore.StaticAssets.Tests (1)
StaticAssetsIntegrationTests.cs (1)
1031new [] { new HttpMethod("VERB") }
Microsoft.AspNetCore.StaticFiles.Tests (1)
CacheHeaderTests.cs (1)
442new [] { new HttpMethod("VERB") }
Microsoft.AspNetCore.TestHost (1)
RequestBuilder.cs (1)
74_req.Method = new HttpMethod(method);
Microsoft.DotNet.Helix.Sdk (1)
StopAzurePipelinesTestRun.cs (1)
30new HttpMethod("PATCH"),
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (1)
Modeler\ServiceClientModelFactory.cs (1)
233return new HttpMethod("PATCH");
Microsoft.DotNet.VersionTools (4)
Automation\GitHubApi\GitHubClient.cs (3)
209HttpRequestMessage request = new HttpRequestMessage(new HttpMethod("PATCH"), url); 372HttpRequestMessage request = new HttpRequestMessage(new HttpMethod("POST"), url) 396HttpRequestMessage request = new HttpRequestMessage(new HttpMethod("PATCH"), url)
Automation\VstsApi\VstsAdapterClient.cs (1)
169var request = new HttpRequestMessage(new HttpMethod("PATCH"), url)
Microsoft.Extensions.Http.Diagnostics.Tests (2)
Telemetry\DownstreamDependencyMetadataManagerTests.cs (2)
50Method = new HttpMethod(method: httpMethod), 70Method = new HttpMethod(method: httpMethod),
System.Net.Http (11)
System\Net\Http\HttpMethod.cs (11)
14public static HttpMethod Get { get; } = new("GET", H3StaticTable.MethodGet); 15public static HttpMethod Put { get; } = new("PUT", H3StaticTable.MethodPut); 16public static HttpMethod Post { get; } = new("POST", H3StaticTable.MethodPost); 17public static HttpMethod Delete { get; } = new("DELETE", H3StaticTable.MethodDelete); 18public static HttpMethod Head { get; } = new("HEAD", H3StaticTable.MethodHead); 19public static HttpMethod Options { get; } = new("OPTIONS", H3StaticTable.MethodOptions); 20public static HttpMethod Trace { get; } = new("TRACE", http3StaticTableIndex: -1); 21public static HttpMethod Patch { get; } = new("PATCH", http3StaticTableIndex: -1); 25public static HttpMethod Connect { get; } = new("CONNECT", H3StaticTable.MethodConnect); 86/// same validation being performed as by the <see cref="HttpMethod(string)"/> constructor. 90new HttpMethod(method.ToString());
1046 references to HttpMethod
Aspire.Dashboard.Tests (11)
Integration\OtlpCorsHttpServiceTests.cs (5)
30var preflightRequest = new HttpRequestMessage(HttpMethod.Options, "/v1/logs"); 55var preflightRequest1 = new HttpRequestMessage(HttpMethod.Options, "/v1/logs"); 69var preflightRequest2 = new HttpRequestMessage(HttpMethod.Options, "/v1/logs"); 95var preflightRequest = new HttpRequestMessage(HttpMethod.Options, "/v1/logs"); 123var preflightRequest = new HttpRequestMessage(HttpMethod.Options, "/v1/logs");
Integration\OtlpHttpServiceTests.cs (2)
140var requestMessage = new HttpRequestMessage(HttpMethod.Post, "/v1/logs"); 168var requestMessage = new HttpRequestMessage(HttpMethod.Post, "/v1/logs");
Integration\ResponseCompressionTests.cs (2)
26var request = new HttpRequestMessage(HttpMethod.Get, DashboardUrls.StructuredLogsBasePath); 48var request = new HttpRequestMessage(HttpMethod.Get, path);
Integration\StartupTests.cs (2)
298var request = new HttpRequestMessage(HttpMethod.Get, "/"); 399var request = new HttpRequestMessage(HttpMethod.Get, "/");
Aspire.Hosting (1)
Dcp\DcpKubernetesClient.cs (1)
71var httpResponse = await SendRequest<object?>(url, HttpMethod.Get, customHeaders : null, body: null, cancellationToken).ConfigureAwait(false);
Aspire.Hosting.Redis (1)
RedisBuilderExtensions.cs (1)
284var deleteRequest = new HttpRequestMessage(HttpMethod.Delete, databasesPath)
CodeGenerator (9)
src\Shared\runtime\Http3\QPack\H3StaticTable.Http3.cs (9)
11private static readonly Dictionary<HttpMethod, int> s_methodIndex = new Dictionary<HttpMethod, int> 14[HttpMethod.Delete] = 16, 15[HttpMethod.Get] = 17, 16[HttpMethod.Head] = 18, 17[HttpMethod.Options] = 19, 18[HttpMethod.Post] = 20, 19[HttpMethod.Put] = 21, 49public static IReadOnlyDictionary<HttpMethod, int> MethodIndex => s_methodIndex;
DaprServiceA (1)
Program.cs (1)
29var forecasts = await client.InvokeMethodAsync<WeatherForecast[]>(HttpMethod.Get, "serviceb", "weatherforecast");
Diagnostics.FunctionalTests (13)
DatabaseErrorPageSampleTest.cs (1)
25var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/");
DeveloperExceptionPageSampleTest.cs (2)
26var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/"); 41var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/");
ExceptionHandlerSampleTest.cs (1)
22var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/throw");
MiddlewareAnalysisSampleTest.cs (1)
22var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/");
ProblemDetailsExceptionHandlerSampleTest.cs (2)
26var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/throw"); 43var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/throw2/conflict");
StatusCodeSampleTest.cs (5)
27var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/errors/417"); 43var request = new HttpRequestMessage(HttpMethod.Get, $"http://localhost/?statuscode={httpStatusCode}"); 60var request = new HttpRequestMessage(HttpMethod.Get, $"http://localhost/?statuscode={httpStatusCode}"); 81var request = new HttpRequestMessage(HttpMethod.Get, $"http://localhost?statuscode={httpStatusCode}"); 99var request = new HttpRequestMessage(HttpMethod.Get, $"http://localhost?statuscode={httpStatusCode}");
WelcomePageSampleTest.cs (1)
21var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/");
dotnet-svcutil-lib (2)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpChannelFactory.cs (2)
594var requestMessage = new HttpRequestMessage(HttpMethod.Post, httpRequestUri); 1237Method = HttpMethod.Head,
GenerateRulesMissingDocumentation (1)
Program.cs (1)
113var request = new HttpRequestMessage(HttpMethod.Head, uri);
HttpStress (11)
Program.cs (11)
122using (var req = new HttpRequestMessage(HttpMethod.Get, serverUri + path) { Version = httpVersion }) 174using (var req = new HttpRequestMessage(HttpMethod.Get, serverUri) { Version = httpVersion }) 203using (var req = new HttpRequestMessage(HttpMethod.Get, serverUri + "/headers") { Version = httpVersion }) 215using (var req = new HttpRequestMessage(HttpMethod.Get, serverUri) { Version = httpVersion }) 243using (var req = new HttpRequestMessage(HttpMethod.Post, serverUri) { Version = httpVersion, Content = new StringDuplexContent(content) }) 257using (var req = new HttpRequestMessage(HttpMethod.Post, serverUri + "/duplex") { Version = httpVersion, Content = new StringDuplexContent(content) }) 271using (var req = new HttpRequestMessage(HttpMethod.Post, serverUri + "/duplexSlow") { Version = httpVersion, Content = new ByteAtATimeNoLengthContent(Encoding.ASCII.GetBytes(content)) }) 285using (var req = new HttpRequestMessage(HttpMethod.Post, serverUri) { Version = httpVersion, Content = new StringContent(content) }) 302using (var req = new HttpRequestMessage(HttpMethod.Post, serverUri) { Version = httpVersion, Content = new StringContent(content) }) 325using (var req = new HttpRequestMessage(HttpMethod.Head, serverUri) { Version = httpVersion }) 347using (var req = new HttpRequestMessage(HttpMethod.Put, serverUri) { Version = httpVersion, Content = new StringContent(content) })
IIS.FunctionalTests (6)
Http3Tests.cs (1)
67var request = new HttpRequestMessage(HttpMethod.Get, address);
src\Servers\IIS\IIS\test\Common.FunctionalTests\BasicAuthTests.cs (1)
60var request = new HttpRequestMessage(HttpMethod.Get, "/Auth");
src\Servers\IIS\IIS\test\Common.FunctionalTests\Latin1Tests.cs (2)
48var requestMessage = new HttpRequestMessage(HttpMethod.Get, $"{deploymentResult.ApplicationBaseUri}Latin1"); 66var requestMessage = new HttpRequestMessage(HttpMethod.Get, $"{deploymentResult.ApplicationBaseUri}InvalidCharacter");
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestResponseTests.cs (2)
127var request = new HttpRequestMessage(HttpMethod.Get, "/CompressedData"); 145var request = new HttpRequestMessage(HttpMethod.Get, "/CompressedData");
IISExpress.FunctionalTests (5)
src\Servers\IIS\IIS\test\Common.FunctionalTests\BasicAuthTests.cs (1)
60var request = new HttpRequestMessage(HttpMethod.Get, "/Auth");
src\Servers\IIS\IIS\test\Common.FunctionalTests\Latin1Tests.cs (2)
48var requestMessage = new HttpRequestMessage(HttpMethod.Get, $"{deploymentResult.ApplicationBaseUri}Latin1"); 66var requestMessage = new HttpRequestMessage(HttpMethod.Get, $"{deploymentResult.ApplicationBaseUri}InvalidCharacter");
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestResponseTests.cs (2)
127var request = new HttpRequestMessage(HttpMethod.Get, "/CompressedData"); 145var request = new HttpRequestMessage(HttpMethod.Get, "/CompressedData");
Interop.FunctionalTests (64)
Http2\Http2RequestTests.cs (4)
126var request1 = new HttpRequestMessage(HttpMethod.Get, $"https://[::1]:{host.GetPort()}/"); 183var request1 = new HttpRequestMessage(HttpMethod.Get, $"http://127.0.0.1:{host.GetPort()}/"); 209var request = new HttpRequestMessage(HttpMethod.Get, $"http://127.0.0.1:{host.GetPort()}/"); 292var request = new HttpRequestMessage(HttpMethod.Get, $"http://127.0.0.1:{host.GetPort()}/");
Http3\Http3RequestTests.cs (39)
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}/"); 1780var responseTask1 = client.SendAsync(CreateHttp3Request(HttpMethod.Get, $"https://127.0.0.1:{port}/1"), CancellationToken.None); 1830var response3 = await client.SendAsync(CreateHttp3Request(HttpMethod.Get, $"https://127.0.0.1:{port}/3"), CancellationToken.None); 1837private HttpRequestMessage CreateHttp3Request(HttpMethod method, string url) 1885var request1 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{port}/"); 1962var request1 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{port}/"); 2038var request = new HttpRequestMessage(HttpMethod.Post, $"https://127.0.0.1:{host.GetPort()}/"); 2138var request = new HttpRequestMessage(HttpMethod.Post, $"https://127.0.0.1:{host.GetPort()}/"); 2192var request = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/");
Http3\Http3TlsTests.cs (7)
56var request = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 103var request = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 145var request = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 194var request = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 244var request = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 322var request = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 473var request = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/");
HttpClientHttp2InteropTests.cs (14)
91using var request = CreateRequestMessage(HttpMethod.Post, url, new BulkContent()); 185using var request = CreateRequestMessage(HttpMethod.Post, url, new BulkContent()); 298var request = CreateRequestMessage(HttpMethod.Post, url, streamingContent); 375var request = CreateRequestMessage(HttpMethod.Post, url, streamingContent); 435var request = CreateRequestMessage(HttpMethod.Post, url, streamingContent); 734var request = CreateRequestMessage(HttpMethod.Post, url, streamingContent); 791var request = CreateRequestMessage(HttpMethod.Post, url, streamingContent); 843var request = CreateRequestMessage(HttpMethod.Post, url, streamingContent); 888var request = CreateRequestMessage(HttpMethod.Post, url, streamingContent); 1056var request = CreateRequestMessage(HttpMethod.Get, url, content: null); 1165var request = CreateRequestMessage(HttpMethod.Get, url, content: null); 1364var request = CreateRequestMessage(HttpMethod.Get, url, content: null); 1566var request = CreateRequestMessage(HttpMethod.Get, url, content: null); 1696private static HttpRequestMessage CreateRequestMessage(HttpMethod method, string url, HttpContent content)
Microsoft.AspNetCore.Authentication.Google (1)
GoogleHandler.cs (1)
47var request = new HttpRequestMessage(HttpMethod.Get, Options.UserInformationEndpoint);
Microsoft.AspNetCore.Authentication.MicrosoftAccount (1)
MicrosoftAccountHandler.cs (1)
43var request = new HttpRequestMessage(HttpMethod.Get, Options.UserInformationEndpoint);
Microsoft.AspNetCore.Authentication.OAuth (1)
OAuthHandler.cs (1)
218var requestMessage = new HttpRequestMessage(HttpMethod.Post, Options.TokenEndpoint);
Microsoft.AspNetCore.Authentication.OpenIdConnect (3)
OpenIdConnectHandler.cs (3)
596var requestMessage = new HttpRequestMessage(HttpMethod.Post, parEndpoint); 991var requestMessage = new HttpRequestMessage(HttpMethod.Post, tokenEndpointRequest.TokenEndpoint ?? _configuration?.TokenEndpoint); 1057var requestMessage = new HttpRequestMessage(HttpMethod.Get, userInfoEndpoint);
Microsoft.AspNetCore.Authentication.Test (19)
CookieTests.cs (1)
1905var request = new HttpRequestMessage(HttpMethod.Get, uri);
JwtBearerTests.cs (2)
909var response = await server.CreateClient().SendAsync(new HttpRequestMessage(HttpMethod.Get, string.Empty)); 1250var request = new HttpRequestMessage(HttpMethod.Get, uri);
JwtBearerTests_Handler.cs (2)
854var response = await server.CreateClient().SendAsync(new HttpRequestMessage(HttpMethod.Get, string.Empty)); 1317var request = new HttpRequestMessage(HttpMethod.Get, uri);
OpenIdConnect\OpenIdConnectAuthenticateTests.cs (1)
58var request = new HttpRequestMessage(HttpMethod.Post, "/");
OpenIdConnect\TestServerExtensions.cs (1)
19return SendAsync(server, new HttpRequestMessage(HttpMethod.Get, url), cookieHeader);
TestExtensions.cs (1)
20var request = new HttpRequestMessage(HttpMethod.Get, uri);
TwitterTests.cs (3)
218var request = new HttpRequestMessage(HttpMethod.Get, "/signin-twitter?denied=ABCDEFG"); 268var request = new HttpRequestMessage(HttpMethod.Get, "/signin-twitter?denied=ABCDEFG"); 375var request = new HttpRequestMessage(HttpMethod.Get, "/signin-twitter?denied=ABCDEFG");
WsFederation\WsFederationTest.cs (4)
126var request = new HttpRequestMessage(HttpMethod.Post, queryItems["wreply"]); 133request = new HttpRequestMessage(HttpMethod.Get, response.Headers.Location); 160var request = new HttpRequestMessage(HttpMethod.Get, response.Headers.Location); 177var request = new HttpRequestMessage(HttpMethod.Post, queryItems["wreply"]);
WsFederation\WsFederationTest_Handler.cs (4)
124var request = new HttpRequestMessage(HttpMethod.Post, queryItems["wreply"]); 131request = new HttpRequestMessage(HttpMethod.Get, response.Headers.Location); 158var request = new HttpRequestMessage(HttpMethod.Get, response.Headers.Location); 175var request = new HttpRequestMessage(HttpMethod.Post, queryItems["wreply"]);
Microsoft.AspNetCore.Authentication.Twitter (4)
TwitterHandler.cs (4)
183private async Task<HttpResponseMessage> ExecuteRequestAsync(string url, HttpMethod httpMethod, RequestToken? accessToken = null, Dictionary<string, string>? extraOAuthPairs = null, Dictionary<string, string>? queryParameters = null, Dictionary<string, string>? formData = null) 273var response = await ExecuteRequestAsync(TwitterDefaults.RequestTokenEndpoint, HttpMethod.Post, extraOAuthPairs: new Dictionary<string, string>() { { "oauth_callback", callBackUri } }); 299var response = await ExecuteRequestAsync(TwitterDefaults.AccessTokenEndpoint, HttpMethod.Post, token, formData: formPost); 324var response = await ExecuteRequestAsync("https://api.twitter.com/1.1/account/verify_credentials.json", HttpMethod.Get, accessToken, queryParameters: new Dictionary<string, string>() { { "include_email", "true" } });
Microsoft.AspNetCore.CookiePolicy.Test (1)
TestExtensions.cs (1)
17var request = new HttpRequestMessage(HttpMethod.Get, uri);
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (15)
Logging\AcceptanceTests.cs (10)
192Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Post.ToString()); 252Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Post.ToString()); 292using var request = new HttpRequestMessage(HttpMethod.Post, "/") 323Assert.Single(requestState, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Post.ToString()); 356using var httpMessage = new HttpRequestMessage(HttpMethod.Get, "/"); 384Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Get.ToString()); 423Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Delete.ToString()); 582Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Get.ToString()); 623Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Put.ToString()); 657Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Put.ToString());
Logging\AcceptanceTests.Mvc.cs (5)
84Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Get.ToString()); 122Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Get.ToString()); 174Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Get.ToString()); 209Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Get.ToString()); 252Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Get.ToString());
Microsoft.AspNetCore.Diagnostics.Tests (4)
DeveloperExceptionPageMiddlewareTest.cs (3)
62var request = new HttpRequestMessage(HttpMethod.Get, "/path"); 115var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/test/1"); 174var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/test/1");
ExceptionHandlerMiddlewareTest.cs (1)
68var request = new HttpRequestMessage(HttpMethod.Get, "/path");
Microsoft.AspNetCore.Http.Connections.Client (8)
HttpConnection.cs (1)
472using (var request = new HttpRequestMessage(HttpMethod.Post, uri))
Internal\LoggingHttpMessageHandler.cs (2)
42public static partial void SendingHttpRequest(ILogger logger, HttpMethod requestMethod, Uri requestUrl); 45public static partial void UnsuccessfulHttpResponse(ILogger logger, HttpStatusCode statusCode, HttpMethod requestMethod, Uri requestUrl);
Internal\LongPollingTransport.cs (3)
54var request = new HttpRequestMessage(HttpMethod.Get, url); 154var request = new HttpRequestMessage(HttpMethod.Get, pollUrl); 233var request = new HttpRequestMessage(HttpMethod.Delete, url);
Internal\SendUtils.cs (1)
43var request = new HttpRequestMessage(HttpMethod.Post, sendUrl);
Internal\ServerSentEventsTransport.cs (1)
55var request = new HttpRequestMessage(HttpMethod.Get, url);
Microsoft.AspNetCore.HttpLogging.Tests (11)
HttpLoggingMiddlewareTests.cs (11)
1731var initialResponse = await client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "/attr_responseonly")); 1746var initialResponse = await client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "/attr_responseandrequest")); 1761var initialResponse = await client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "/attr_restrictedheaders")); 1776var request = new HttpRequestMessage(HttpMethod.Get, "/attr_restrictedsize") { Content = new ReadOnlyMemoryContent("from request"u8.ToArray()) }; 1802var request = new HttpRequestMessage(HttpMethod.Get, "/attr_responseandrequest"); 1821var initialResponse = await client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "/ext_responseonly")); 1836var initialResponse = await client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "/ext_responseandrequest")); 1851var initialResponse = await client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "/ext_restrictedheaders")); 1866var request = new HttpRequestMessage(HttpMethod.Get, "/ext_restrictedsize") { Content = new ReadOnlyMemoryContent("from request"u8.ToArray()) }; 1892var request = new HttpRequestMessage(HttpMethod.Get, "/ext_responseandrequest"); 1938var request = new HttpRequestMessage(HttpMethod.Get, "/");
Microsoft.AspNetCore.HttpOverrides.Tests (6)
HttpMethodOverrideMiddlewareTest.cs (6)
39var req = new HttpRequestMessage(HttpMethod.Post, ""); 70var req = new HttpRequestMessage(HttpMethod.Post, ""); 100var req = new HttpRequestMessage(HttpMethod.Get, ""); 133var req = new HttpRequestMessage(HttpMethod.Post, ""); 171var req = new HttpRequestMessage(HttpMethod.Post, ""); 208var req = new HttpRequestMessage(HttpMethod.Post, "");
Microsoft.AspNetCore.HttpsPolicy.Tests (19)
HstsMiddlewareTests.cs (8)
66var request = new HttpRequestMessage(HttpMethod.Get, ""); 112var request = new HttpRequestMessage(HttpMethod.Get, ""); 158var request = new HttpRequestMessage(HttpMethod.Get, ""); 203var request = new HttpRequestMessage(HttpMethod.Get, ""); 258var request = new HttpRequestMessage(HttpMethod.Get, ""); 313var request = new HttpRequestMessage(HttpMethod.Get, ""); 360var request = new HttpRequestMessage(HttpMethod.Get, ""); 406var request = new HttpRequestMessage(HttpMethod.Get, "");
HttpsPolicyTests.cs (2)
65var request = new HttpRequestMessage(HttpMethod.Get, ""); 74request = new HttpRequestMessage(HttpMethod.Get, expectedUrl);
HttpsRedirectionMiddlewareTests.cs (9)
51var request = new HttpRequestMessage(HttpMethod.Get, ""); 106var request = new HttpRequestMessage(HttpMethod.Get, ""); 162var request = new HttpRequestMessage(HttpMethod.Get, ""); 224var request = new HttpRequestMessage(HttpMethod.Get, ""); 264var request = new HttpRequestMessage(HttpMethod.Get, ""); 310var request = new HttpRequestMessage(HttpMethod.Get, ""); 352var request = new HttpRequestMessage(HttpMethod.Get, ""); 400var request = new HttpRequestMessage(HttpMethod.Get, ""); 444var request = new HttpRequestMessage(HttpMethod.Get, "");
Microsoft.AspNetCore.Identity.InMemory.Test (1)
FunctionalTest.cs (1)
430var request = new HttpRequestMessage(HttpMethod.Get, uri);
Microsoft.AspNetCore.Identity.Test (1)
RetryHandler.cs (1)
30var method = request.Method;
Microsoft.AspNetCore.Localization.FunctionalTests (1)
LocalizationSampleTest.cs (1)
32var request = new HttpRequestMessage(HttpMethod.Get, "My/Resources");
Microsoft.AspNetCore.Mvc.FunctionalTests (305)
AntiforgeryMiddlewareTest.cs (5)
40var request = new HttpRequestMessage(HttpMethod.Post, "/Test/PostWithRequireAntiforgeryToken"); 83var request = new HttpRequestMessage(HttpMethod.Post, "/Test/PostWithRequireAntiforgeryToken"); 124var request = new HttpRequestMessage(HttpMethod.Post, "/Test/PostWithRequireAntiforgeryTokenAndSizeLimit"); 156var request = new HttpRequestMessage(HttpMethod.Post, "/Test/PostWithRequireAntiforgeryTokenAndFormLimit"); 188var request = new HttpRequestMessage(HttpMethod.Post, "/TestWithRequestSizeLimit/PostWithRequireAntiforgeryTokenAndDisableSizeLimit");
AntiforgeryTests.cs (5)
67var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/Antiforgery/Login"); 117var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/Antiforgery/FlushAsyncLogin"); 147var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/Antiforgery/Login"); 190var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/Antiforgery/Login"); 203var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/Antiforgery/LoginWithRedirectResultFilter");
ApiBehaviorTest.cs (2)
103var requestMessage = new HttpRequestMessage(HttpMethod.Post, "/contact") 119var requestMessage = new HttpRequestMessage(HttpMethod.Post, "/contact")
ApplicationModelTest.cs (1)
126var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Home/GetHelloWorld");
AsyncEnumerableTestBase.cs (1)
75var request = new HttpRequestMessage(HttpMethod.Get, "asyncenumerable/getallprojects");
AuthMiddlewareAndFilterTestBase.cs (20)
56var request = new HttpRequestMessage(HttpMethod.Get, action); 74var request = new HttpRequestMessage(HttpMethod.Get, action); 81request = new HttpRequestMessage(HttpMethod.Get, action); 120var request = new HttpRequestMessage(HttpMethod.Get, "PagesHome"); 130var request = new HttpRequestMessage(HttpMethod.Get, "/Authorized/Api"); 136request = new HttpRequestMessage(HttpMethod.Get, "/Authorized/Api"); 145var request = new HttpRequestMessage(HttpMethod.Get, "/Authorized/AllowAnonymous"); 149request = new HttpRequestMessage(HttpMethod.Get, "/Authorized/Api"); 155request = new HttpRequestMessage(HttpMethod.Get, "/Authorized/Api"); 164var request = new HttpRequestMessage(HttpMethod.Get, "/Authorized/Cookie"); 170request = new HttpRequestMessage(HttpMethod.Get, "/Authorized/Cookie"); 179var request = new HttpRequestMessage(HttpMethod.Get, "/Authorized/AllowAnonymous"); 183request = new HttpRequestMessage(HttpMethod.Get, "/Authorized/Cookie"); 189request = new HttpRequestMessage(HttpMethod.Get, "/Authorized/Cookie"); 198var request = new HttpRequestMessage(HttpMethod.Get, "/Authorized/Cookie"); 204request = new HttpRequestMessage(HttpMethod.Get, "/Authorized/Cookie"); 209request = new HttpRequestMessage(HttpMethod.Get, "/Authorized/Api"); 216request = new HttpRequestMessage(HttpMethod.Get, "/Authorized/Api"); 251var request = new HttpRequestMessage(HttpMethod.Get, url); 258request = new HttpRequestMessage(HttpMethod.Get, url);
AuthMiddlewareUsingRequireAuthTest.cs (2)
47var request = new HttpRequestMessage(HttpMethod.Get, action); 66var request = new HttpRequestMessage(HttpMethod.Get, action);
BasicTests.cs (2)
207HttpMethod.Post, 649var request = new HttpRequestMessage(HttpMethod.Post, "/Home/Product");
ConsumesAttributeTestsBase.cs (8)
48HttpMethod.Post, 65HttpMethod.Post, 82HttpMethod.Post, 100HttpMethod.Post, 121HttpMethod.Post, 145HttpMethod.Post, 166HttpMethod.Post, 189HttpMethod.Post,
ContentNegotiationTest.cs (12)
109var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/ContentNegotiation/UserInfo_ProducesWithTypeOnly"); 127HttpMethod.Get, 152HttpMethod.Get, 346var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/ContentNegotiation/UserInfo"); 367var request = new HttpRequestMessage(HttpMethod.Get, "FallbackOnTypeBasedMatch/ReturnString"); 385var request = new HttpRequestMessage(HttpMethod.Get, targetUri); 404var request = new HttpRequestMessage(HttpMethod.Post, targetUri); 420var request = new HttpRequestMessage(HttpMethod.Get, targetUri); 435var request = new HttpRequestMessage(HttpMethod.Get, targetUri); 450var request = new HttpRequestMessage(HttpMethod.Get, targetUri); 489var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/ProducesWithMediaTypeSuffixesController/ContactInfo"); 507var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/ProducesWithMediaTypeSuffixesController/ContactInfo");
ControllerFromServicesTests.cs (1)
35var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/constructorinjection?value=14");
CorsTestsBase.cs (3)
155HttpMethod.Put, 222var request = new HttpRequestMessage(HttpMethod.Put, "http://localhost/Cors/GetUserComments"); 416HttpMethod.Put,
CustomValueProviderTest.cs (4)
43var request = new HttpRequestMessage(HttpMethod.Get, url); 60var request = new HttpRequestMessage(HttpMethod.Get, url); 77var request = new HttpRequestMessage(HttpMethod.Get, url); 94var request = new HttpRequestMessage(HttpMethod.Get, url);
DoNotRespectBrowserAcceptHeaderTests.cs (3)
101request.Method = HttpMethod.Post; 132request.Method = HttpMethod.Post; 148var request = new HttpRequestMessage(HttpMethod.Get, url);
FileResultTests.cs (27)
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"); 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"); 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"); 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"); 802var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/EmbeddedFiles/DownloadFileWithFileName_WithEtag"); 825var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/EmbeddedFiles/DownloadFileWithFileName_WithEtag"); 850var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/EmbeddedFiles/DownloadFileWithFileName"); 873var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/EmbeddedFiles/DownloadFileWithFileName"); 908var httpRequestMessage = new HttpRequestMessage(HttpMethod.Head, "http://localhost/EmbeddedFiles/DownloadFileWithFileName");
FiltersTest.cs (1)
87var request = new HttpRequestMessage(HttpMethod.Post, url)
FormFileUploadTest.cs (2)
39var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/UploadFiles"); 67var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/UploadProductSpecs");
GlobalAuthorizationFilterTestBase.cs (1)
72var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Administration/EitherCookie");
HtmlGenerationTest.cs (7)
324var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/Customer/HtmlGeneration_Customer"); 350var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Customer/HtmlGeneration_Customer/CustomerWithRecords"); 376var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/Customer/HtmlGeneration_Customer/CustomerWithRecords"); 504var request = new HttpRequestMessage(HttpMethod.Get, "/catalog/cart?correlationid=2"); 617var requestMessage = new HttpRequestMessage(HttpMethod.Post, "/categories/Electronics"); 786var request = new HttpRequestMessage(HttpMethod.Post, "HtmlGeneration_Home/ValidationProviderAttribute"); 806var request = new HttpRequestMessage(HttpMethod.Get, url);
InputObjectValidationTests.cs (4)
268var requestMessage = new HttpRequestMessage(HttpMethod.Post, "Validation/ValidationThrowsError_WhenValidationExceedsMaxValidationDepth") 289var requestMessage = new HttpRequestMessage(HttpMethod.Post, "TestApi/PostBookWithNoValidation") 318var requestMessage = new HttpRequestMessage(HttpMethod.Post, "TestApi/PostBookWithNoValidation") 350var requestMessage = new HttpRequestMessage(HttpMethod.Post, "TestApi/PostBookWithNoValidation")
JsonInputFormatterTestBase.cs (1)
223var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/JsonFormatter/ReturnInput/");
JsonOutputFormatterTestBase.cs (1)
51var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/SerializableError/CreateEmployee");
JsonResultWithNewtonsoftJsonTest.cs (6)
43var request = new HttpRequestMessage(HttpMethod.Get, url); 64var request = new HttpRequestMessage(HttpMethod.Get, url); 83var request = new HttpRequestMessage(HttpMethod.Get, url); 101var request = new HttpRequestMessage(HttpMethod.Get, url); 118var request = new HttpRequestMessage(HttpMethod.Get, url); 134var request = new HttpRequestMessage(HttpMethod.Get, url);
JsonResultWithSystemTextJsonTest.cs (6)
43var request = new HttpRequestMessage(HttpMethod.Get, url); 64var request = new HttpRequestMessage(HttpMethod.Get, url); 83var request = new HttpRequestMessage(HttpMethod.Get, url); 101var request = new HttpRequestMessage(HttpMethod.Get, url); 118var request = new HttpRequestMessage(HttpMethod.Get, url); 134var request = new HttpRequestMessage(HttpMethod.Get, url);
KeyedServicesTests.cs (6)
33var okRequest = new HttpRequestMessage(HttpMethod.Get, "/services/GetOk"); 34var notokRequest = new HttpRequestMessage(HttpMethod.Get, "/services/GetNotOk"); 51var request = new HttpRequestMessage(HttpMethod.Get, "/services/GetBoth"); 65var request = new HttpRequestMessage(HttpMethod.Get, "/services/GetKeyNull"); 79var request = new HttpRequestMessage(HttpMethod.Get, "/services/GetOptionalNotRegistered"); 93var request = new HttpRequestMessage(HttpMethod.Get, "/services/GetRequiredNotRegistered");
NonNullableReferenceTypesTest.cs (2)
52var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/NonNullable"); 94var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/NonNullable");
RazorPageModelTest.cs (6)
39var request = new HttpRequestMessage(HttpMethod.Post, "Pages/TryUpdateModel/10") 64var request = new HttpRequestMessage(HttpMethod.Post, "Pages/TryValidateModel/10") 89var request = new HttpRequestMessage(HttpMethod.Post, "Pages/TryValidateModel/10") 115var request = new HttpRequestMessage(HttpMethod.Post, "Pages/TryUpdateModelPageModel/10") 140var request = new HttpRequestMessage(HttpMethod.Post, "Pages/TryValidateModelPageModel/10") 165var request = new HttpRequestMessage(HttpMethod.Post, "Pages/TryValidateModelPageModel/10")
RazorPagesTest.cs (43)
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"); 466var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/PageWithoutContent/No/Content/Path"); 482var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/OnGetView"); 499var request = new HttpRequestMessage(HttpMethod.Get, url); 508request = new HttpRequestMessage(HttpMethod.Get, response.Headers.Location); 524var request = new HttpRequestMessage(HttpMethod.Get, url); 533request = new HttpRequestMessage(HttpMethod.Get, response.Headers.Location); 549var request = new HttpRequestMessage(HttpMethod.Get, url); 558request = new HttpRequestMessage(HttpMethod.Get, response.Headers.Location); 573var getRequest = new HttpRequestMessage(HttpMethod.Get, "http://localhost/TempData/TempDataPageModelProperty"); 580var request = new HttpRequestMessage(HttpMethod.Post, url); 594request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/TempData/TempDataPageModelProperty"); 671var request = new HttpRequestMessage(HttpMethod.Post, "Pages/PropertyBinding/PagePropertyBinding/10") 700var request = new HttpRequestMessage(HttpMethod.Post, "Pages/PropertyBinding/PagePropertyBinding/27") 726var request = new HttpRequestMessage(HttpMethod.Post, "Pages/PropertyBinding/PageModelWithPropertyBinding/10?PropertyWithSupportGetsTrue=foo") 757var request = new HttpRequestMessage(HttpMethod.Post, url) 786var request = new HttpRequestMessage(HttpMethod.Post, "Pages/PropertyBinding/PolymorphicBinding") 811var request = new HttpRequestMessage(HttpMethod.Post, "Pages/PropertyBinding/PolymorphicBinding") 842var request = new HttpRequestMessage(HttpMethod.Post, "Pages/PropertyBinding/PageWithPropertyAndArgumentBinding?id=11") 867var request = new HttpRequestMessage(HttpMethod.Get, "Pages/PropertyBinding/PageWithPropertyAndArgumentBinding?id=11") 890var request = new HttpRequestMessage(HttpMethod.Head, "Pages/PropertyBinding/PageModelWithPropertyBinding/10?PropertyWithSupportGetsTrue=foo"); 906var request = new HttpRequestMessage(HttpMethod.Head, "Pages/PropertyBinding/BindPropertyWithGet?value=11"); 923var request = new HttpRequestMessage(HttpMethod.Get, "Pages/PropertyBinding/BindPropertyWithGet?value=11"); 983var request = new HttpRequestMessage(HttpMethod.Post, "/Pages/Redirects/RedirectToSelf") 1288var request = new HttpRequestMessage(HttpMethod.Post, "/Pages/PropertyBinding/BindPropertiesOnModel?Property1=123") 1326var request = new HttpRequestMessage(HttpMethod.Post, "/Pages/PropertyBinding/BindPropertiesOnModel?Property1=123") 1455var request = new HttpRequestMessage(HttpMethod.Options, "http://localhost/HelloWorld"); 1471var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/HelloWorldWithOptionsHandler"); 1487var request = new HttpRequestMessage(HttpMethod.Options, "http://localhost/HelloWorldWithOptionsHandler");
RazorPagesWithBasePathTest.cs (8)
432var message = new HttpRequestMessage(HttpMethod.Post, "/CustomModelTypeModel") 461var message = new HttpRequestMessage(HttpMethod.Post, "/CustomModelTypeModel?Attempts=3") 489var message = new HttpRequestMessage(HttpMethod.Post, "/CustomModelTypeModel") 616var request = new HttpRequestMessage(HttpMethod.Head, "/Antiforgery/AntiforgeryDefault"); 629var request = new HttpRequestMessage(HttpMethod.Post, "/Antiforgery/AntiforgeryDefault"); 642var request = new HttpRequestMessage(HttpMethod.Post, "/Antiforgery/AntiforgeryDefault"); 656var request = new HttpRequestMessage(HttpMethod.Post, "/Antiforgery/IgnoreAntiforgery"); 707var request = new HttpRequestMessage(HttpMethod.Post, url)
ReadFromDisconnectedClientTest.cs (2)
42var request = new HttpRequestMessage(HttpMethod.Post, "ReadFromThrowingRequestBody/AppliesAntiforgeryValidation"); 55var request = new HttpRequestMessage(HttpMethod.Post, "ReadFromThrowingRequestBody/ReadForm");
RequestServicesTestBase.cs (4)
53var request = new HttpRequestMessage(HttpMethod.Get, url); 76var request = new HttpRequestMessage(HttpMethod.Get, url); 96var request1 = new HttpRequestMessage(HttpMethod.Get, url); 105var request2 = new HttpRequestMessage(HttpMethod.Get, url);
RequestSizeLimitTest.cs (1)
82request.Method = HttpMethod.Post;
RespectBrowserAcceptHeaderTests.cs (2)
43var request = new HttpRequestMessage(HttpMethod.Get, "RespectBrowserAcceptHeader/ReturnString"); 62var request = new HttpRequestMessage(HttpMethod.Get, "RespectBrowserAcceptHeader/ReturnString");
RoutingAcrossPipelineBranchesTest.cs (12)
42var subdirRequest = new HttpRequestMessage(HttpMethod.Get, "subdir/literal/Branches/Index/s"); 43var commonRequest = new HttpRequestMessage(HttpMethod.Get, "common/Branches/Index/c/literal"); 44var defaultRequest = new HttpRequestMessage(HttpMethod.Get, "Branches/literal/Index/d"); 77var subdirRequest = new HttpRequestMessage(HttpMethod.Get, "subdir/literal/Branches/Index/s" + linkQuery); 78var commonRequest = new HttpRequestMessage(HttpMethod.Get, "common/Branches/Index/c/literal" + linkQuery); 79var defaultRequest = new HttpRequestMessage(HttpMethod.Get, "Branches/literal/Index/d" + linkQuery); 111var subdirRequest = new HttpRequestMessage(HttpMethod.Get, "subdir/literal/Branches/Index/s" + linkQuery + "&link_common=c&link_subdir"); 112var defaultRequest = new HttpRequestMessage(HttpMethod.Get, "Branches/literal/Index/d" + linkQuery + "&link_subdir=s"); 140var commonRequest = new HttpRequestMessage(HttpMethod.Get, "common/literal/Branches/Index/s"); 141var subdirRequest = new HttpRequestMessage(HttpMethod.Get, "subdir/Branches/Index/c/literal"); 142var defaultRequest = new HttpRequestMessage(HttpMethod.Get, "common/Branches/literal/Index/d"); 163var request = new HttpRequestMessage(HttpMethod.Get, "dynamicattributeorder/dynamic/route/rest");
RoutingDynamicOrderTest.cs (6)
44var request = new HttpRequestMessage(HttpMethod.Get, url); 66var request = new HttpRequestMessage(HttpMethod.Get, url); 89var request = new HttpRequestMessage(HttpMethod.Get, url); 111var request = new HttpRequestMessage(HttpMethod.Get, url); 133var request = new HttpRequestMessage(HttpMethod.Get, url); 155var request = new HttpRequestMessage(HttpMethod.Get, url);
RoutingDynamicTest.cs (7)
40var request = new HttpRequestMessage(HttpMethod.Get, url); 55var request = new HttpRequestMessage(HttpMethod.Get, url); 70var request = new HttpRequestMessage(HttpMethod.Get, url); 86var request = new HttpRequestMessage(HttpMethod.Get, url); 100var request = new HttpRequestMessage(HttpMethod.Post, url); 116var request = new HttpRequestMessage(HttpMethod.Get, url); 132var request = new HttpRequestMessage(HttpMethod.Get, url);
RoutingFallbackTest.cs (7)
41var request = new HttpRequestMessage(HttpMethod.Get, url); 56var request = new HttpRequestMessage(HttpMethod.Get, url); 72var request = new HttpRequestMessage(HttpMethod.Get, url); 88var request = new HttpRequestMessage(HttpMethod.Post, url); 104var request = new HttpRequestMessage(HttpMethod.Post, url); 120var request = new HttpRequestMessage(HttpMethod.Get, url); 136var request = new HttpRequestMessage(HttpMethod.Post, url)
RoutingTestsBase.cs (2)
496var response = await Client.SendAsync(new HttpRequestMessage(HttpMethod.Post, url)); 748var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Store/Shop/Orders");
SerializableErrorTests.cs (4)
50var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/SerializableError/ModelStateErrors"); 72var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/SerializableError/LogErrors") 120var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/SerializableError/CreateEmployee"); 161var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/SerializableError/CreateEmployee");
SimpleWithWebApplicationBuilderTests.cs (2)
232var request = new HttpRequestMessage(HttpMethod.Post, "accepts-default"); 247var request = new HttpRequestMessage(HttpMethod.Post, "accepts-xml");
TagHelperComponentTagHelperTest.cs (3)
37var request = new HttpRequestMessage(HttpMethod.Get, url); 57var request = new HttpRequestMessage(HttpMethod.Get, url); 77var request = new HttpRequestMessage(HttpMethod.Get, url);
TagHelpersFromServicesTest.cs (1)
34var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/another/inservicestaghelper");
TempDataInCookiesUsingCookieConsentTest.cs (2)
94var request = new HttpRequestMessage(HttpMethod.Get, path); 101var request = new HttpRequestMessage(HttpMethod.Post, path);
TempDataPropertyTest.cs (1)
162var request = new HttpRequestMessage(HttpMethod.Get, path);
TempDataTestBase.cs (1)
264var request = new HttpRequestMessage(HttpMethod.Get, path);
TestingInfrastructureTests.cs (7)
56var request = new HttpRequestMessage(HttpMethod.Post, "Testing/RedirectHandler/2") 77var request = new HttpRequestMessage(HttpMethod.Post, "Testing/RedirectHandler/2") 100var request = new HttpRequestMessage(HttpMethod.Get, "Testing/RedirectHandler/Headers"); 116var request = new HttpRequestMessage(HttpMethod.Get, "Testing/RedirectHandler/Redirect303"); 130var request = new HttpRequestMessage(HttpMethod.Get, "Testing/RedirectHandler/Relative/"); 143var request = new HttpRequestMessage(HttpMethod.Get, "Testing/RedirectHandler/Redirect303"); 234var request = new HttpRequestMessage(HttpMethod.Get, "Testing/RedirectHandler/RedirectToAuthorized");
VersioningEndpointRoutingTests.cs (2)
34var message = new HttpRequestMessage(HttpMethod.Delete, "http://localhost/" + "Customers/5?version=2"); 53var message = new HttpRequestMessage(HttpMethod.Post, "http://localhost/" + "Customers?version=2");
VersioningTestsBase.cs (18)
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"); 269var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Books?version=" + version); 291var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Books?version=" + version); 395var message = new HttpRequestMessage(HttpMethod.Put, "http://localhost/Movies/5?version=2"); 417var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/" + url); 438var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/" + url); 459var message = new HttpRequestMessage(HttpMethod.Post, "http://localhost/" + url); 483var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/" + url + query); 502var message = new HttpRequestMessage(HttpMethod.Post, "http://localhost/" + "Customers?version=2"); 521var message = new HttpRequestMessage(HttpMethod.Delete, "http://localhost/" + "Customers/5?version=2"); 543var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost" + path);
ViewComponentFromServicesTests.cs (1)
35var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/another/InServicesViewComponent");
ViewEngineTests.cs (2)
163var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/TemplateExpander"); 307var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/TemplateExpander/ViewWithLayout");
XmlDataContractSerializerFormattersWrappingTest.cs (8)
44var request = new HttpRequestMessage(HttpMethod.Get, url); 68var request = new HttpRequestMessage(HttpMethod.Get, url); 92var request = new HttpRequestMessage(HttpMethod.Get, url); 115var request = new HttpRequestMessage(HttpMethod.Get, url); 138var request = new HttpRequestMessage(HttpMethod.Get, url); 163var request = new HttpRequestMessage(HttpMethod.Get, url); 186var request = new HttpRequestMessage(HttpMethod.Get, url); 207var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/IEnumerable/SerializableErrors");
XmlDataContractSerializerInputFormatterTest.cs (2)
58var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/Validation/CreateStore"); 86var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/Validation/CreateStore");
XmlOutputFormatterTests.cs (10)
41HttpMethod.Post, 63HttpMethod.Post, 86HttpMethod.Post, 107HttpMethod.Post, 130HttpMethod.Post, 151HttpMethod.Post, 169HttpMethod.Post, 189HttpMethod.Post, 209HttpMethod.Post, 230HttpMethod.Post,
XmlSerializerFormattersWrappingTest.cs (8)
43var request = new HttpRequestMessage(HttpMethod.Get, url); 64var request = new HttpRequestMessage(HttpMethod.Get, url); 85var request = new HttpRequestMessage(HttpMethod.Get, url); 105var request = new HttpRequestMessage(HttpMethod.Get, url); 125var request = new HttpRequestMessage(HttpMethod.Get, url); 147var request = new HttpRequestMessage(HttpMethod.Get, url); 167var request = new HttpRequestMessage(HttpMethod.Get, url); 185var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/IEnumerable/SerializableErrors");
Microsoft.AspNetCore.Mvc.Testing (4)
Handlers\RedirectHandler.cs (4)
64request.Method == HttpMethod.Post || request.Method == HttpMethod.Put || request.Method == HttpMethod.Patch; 152redirect.Method = HttpMethod.Get;
Microsoft.AspNetCore.OutputCaching.Tests (8)
OutputCacheTests.cs (8)
91var subsequentResponse = await client.SendAsync(new HttpRequestMessage(HttpMethod.Head, "")); 92var initialResponse = await client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "")); 111var initialResponse = await client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "")); 112var subsequentResponse = await client.SendAsync(new HttpRequestMessage(HttpMethod.Head, "")); 962() => client.SendAsync(new HttpRequestMessage(HttpMethod.Get, ""))); 1003var resp = await client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "")); 1069if (initialResponse.RequestMessage.Method == HttpMethod.Head && 1070subsequentResponse.RequestMessage.Method == HttpMethod.Head)
Microsoft.AspNetCore.RequestDecompression.Tests (6)
RequestDecompressionMiddlewareTests.cs (6)
239using var request = new HttpRequestMessage(HttpMethod.Post, ""); 310using var request = new HttpRequestMessage(HttpMethod.Post, ""); 386using var request = new HttpRequestMessage(HttpMethod.Post, ""); 488using var request = new HttpRequestMessage(HttpMethod.Post, ""); 572using var request = new HttpRequestMessage(HttpMethod.Post, ""); 723using var request = new HttpRequestMessage(HttpMethod.Post, "");
Microsoft.AspNetCore.ResponseCaching.Tests (6)
ResponseCachingTests.cs (6)
97var subsequentResponse = await client.SendAsync(new HttpRequestMessage(HttpMethod.Head, "")); 98var initialResponse = await client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "")); 119var initialResponse = await client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "")); 120var subsequentResponse = await client.SendAsync(new HttpRequestMessage(HttpMethod.Head, "")); 973if (initialResponse.RequestMessage.Method == HttpMethod.Head && 974subsequentResponse.RequestMessage.Method == HttpMethod.Head)
Microsoft.AspNetCore.ResponseCompression.Tests (16)
ResponseCompressionMiddlewareTest.cs (16)
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, "");
Microsoft.AspNetCore.Routing.FunctionalTests (32)
EndpointRoutingSampleTest.cs (1)
36var message = new HttpRequestMessage(HttpMethod.Get, $"{branch}/api/get/5");
HostMatchingTests.cs (5)
32var request = new HttpRequestMessage(HttpMethod.Get, "api/DomainWildcard"); 50var request = new HttpRequestMessage(HttpMethod.Get, "api/DomainWildcard"); 68var request = new HttpRequestMessage(HttpMethod.Get, "api/DomainWildcard"); 86var request = new HttpRequestMessage(HttpMethod.Get, "api/DomainWildcard"); 104var request = new HttpRequestMessage(HttpMethod.Get, "api/DomainWildcard");
MapFallbackTest.cs (5)
25var request = new HttpRequestMessage(HttpMethod.Get, "helloworld"); 42var request = new HttpRequestMessage(HttpMethod.Get, path); 59var request = new HttpRequestMessage(HttpMethod.Get, path); 76var request = new HttpRequestMessage(HttpMethod.Get, path); 93var request = new HttpRequestMessage(HttpMethod.Get, path);
MinimalFormTests.cs (13)
53var request = new HttpRequestMessage(HttpMethod.Post, "todo"); 113var request = new HttpRequestMessage(HttpMethod.Post, "todo"); 160var request = new HttpRequestMessage(HttpMethod.Post, "todo"); 199var request = new HttpRequestMessage(HttpMethod.Post, "todo"); 276var request = new HttpRequestMessage(HttpMethod.Post, "todo"); 323var request = new HttpRequestMessage(HttpMethod.Post, "todo"); 419var request = new HttpRequestMessage(HttpMethod.Post, "todo"); 474var request = new HttpRequestMessage(HttpMethod.Post, "todo"); 533var request = new HttpRequestMessage(HttpMethod.Post, "todo"); 585var request = new HttpRequestMessage(HttpMethod.Post, "/todos/1"); 637var request = new HttpRequestMessage(HttpMethod.Post, "/todos/1"); 686var request = new HttpRequestMessage(HttpMethod.Post, "todo"); 750var response = await client.SendAsync(new HttpRequestMessage(HttpMethod.Post, "/")
RouterSampleTest.cs (3)
34var message = new HttpRequestMessage(HttpMethod.Get, $"{branch}/api/get/5"); 48var message = new HttpRequestMessage(HttpMethod.Get, "api/get/5"); 62var message = new HttpRequestMessage(HttpMethod.Get, "api/middleware");
WebHostBuilderExtensionsTest.cs (5)
25new HttpRequestMessage(HttpMethod.Get, "greeting/James"), 37new HttpRequestMessage(HttpMethod.Post, "greeting/James") { Content = new StringContent("Biography") }, 49new HttpRequestMessage(HttpMethod.Put, "greeting/James") { Content = new StringContent("Biography") }, 54new HttpRequestMessage(HttpMethod.Delete, "greeting/James"), 67new HttpRequestMessage(HttpMethod.Post, "greeting/James") { Content = new StringContent("Biography") },
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (6)
Http3Tests.cs (1)
75var request = new HttpRequestMessage(HttpMethod.Get, address);
Listener\ResponseHeaderTests.cs (2)
342var request = new HttpRequestMessage(HttpMethod.Get, uri); 356var request = new HttpRequestMessage(HttpMethod.Head, uri);
OpaqueUpgradeTests.cs (1)
297var request = new HttpRequestMessage(HttpMethod.Post, address);
ResponseHeaderTests.cs (2)
172HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, address); 199HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, address);
Microsoft.AspNetCore.Server.IISIntegration.Tests (18)
IISMiddlewareTests.cs (18)
54var req = new HttpRequestMessage(HttpMethod.Get, ""); 92var req = new HttpRequestMessage(HttpMethod.Get, ""); 134var request = new HttpRequestMessage(HttpMethod.Post, requestPath); 144public static TheoryData<HttpMethod> InvalidShutdownMethods 148return new TheoryData<HttpMethod> 150HttpMethod.Put, 151HttpMethod.Trace, 152HttpMethod.Head, 153HttpMethod.Get, 154HttpMethod.Delete, 155HttpMethod.Options 162public async Task MiddlewareIgnoresShutdownGivenWrongMethod(HttpMethod method) 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.Core (9)
src\Shared\runtime\Http3\QPack\H3StaticTable.Http3.cs (9)
11private static readonly Dictionary<HttpMethod, int> s_methodIndex = new Dictionary<HttpMethod, int> 14[HttpMethod.Delete] = 16, 15[HttpMethod.Get] = 17, 16[HttpMethod.Head] = 18, 17[HttpMethod.Options] = 19, 18[HttpMethod.Post] = 20, 19[HttpMethod.Put] = 21, 49public static IReadOnlyDictionary<HttpMethod, int> MethodIndex => s_methodIndex;
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (7)
WebHostTests.cs (7)
79var request = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 246var request1 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 260var request2 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 317var request1 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 330var request2 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{host.GetPort()}/"); 352var request1 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{http3Port}/"); 366var request2 = new HttpRequestMessage(HttpMethod.Get, $"https://127.0.0.1:{http1Port}/");
Microsoft.AspNetCore.Shared.Tests (9)
src\Shared\runtime\Http3\QPack\H3StaticTable.Http3.cs (9)
11private static readonly Dictionary<HttpMethod, int> s_methodIndex = new Dictionary<HttpMethod, int> 14[HttpMethod.Delete] = 16, 15[HttpMethod.Get] = 17, 16[HttpMethod.Head] = 18, 17[HttpMethod.Options] = 19, 18[HttpMethod.Post] = 20, 19[HttpMethod.Put] = 21, 49public static IReadOnlyDictionary<HttpMethod, int> MethodIndex => s_methodIndex;
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (1)
HubConnectionTests.cs (1)
2980if (request.Method == HttpMethod.Get)
Microsoft.AspNetCore.SignalR.Client.Tests (23)
LongPollingTransportTests.cs (9)
237if (request.Method == HttpMethod.Delete) 331if (request.Method == HttpMethod.Delete) 467if (request.Method == HttpMethod.Post) 472else if (request.Method == HttpMethod.Get) 485else if (request.Method == HttpMethod.Delete) 535if (request.Method == HttpMethod.Post) 540else if (request.Method == HttpMethod.Get) 553else if (request.Method == HttpMethod.Delete) 692var deleteRequest = handler.ReceivedRequests.SingleOrDefault(r => r.Method == HttpMethod.Delete);
ResponseUtils.cs (5)
36return request.Method == HttpMethod.Post && 42return request.Method == HttpMethod.Get && 49return request.Method == HttpMethod.Delete && 55return request.Method == HttpMethod.Get && request.Headers.Accept.Any(h => h.MediaType == "text/event-stream"); 60return request.Method == HttpMethod.Post &&
TestHttpMessageHandler.cs (9)
123if (request.Method.Equals(HttpMethod.Delete) && request.RequestUri.PathAndQuery.Contains("id=")) 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)
Microsoft.AspNetCore.SpaServices.Extensions (1)
AngularCli\AngularCliMiddleware.cs (1)
114new HttpRequestMessage(HttpMethod.Head, cliServerUri),
Microsoft.AspNetCore.StaticAssets.Tests (28)
StaticAssetsIntegrationTests.cs (28)
438var message = new HttpRequestMessage(HttpMethod.Get, "/sample.txt"); 648public async Task IfMatchShouldReturn412WhenNotListed(HttpMethod method) 659public async Task IfMatchShouldBeServedWhenListed(HttpMethod method) 672public async Task IfMatchShouldBeServedForAsterisk(HttpMethod method) 683public async Task IfMatchShouldBeIgnoredForUnsupportedMethods(HttpMethod method) 708public async Task IfNoneMatchShouldReturn304ForMatching(HttpMethod method) 721public async Task IfNoneMatchAllShouldReturn304ForMatching(HttpMethod method) 734public async Task IfNoneMatchShouldBeIgnoredForNonTwoHundredAnd304Responses(HttpMethod method) 757public async Task ServerShouldReturnLastModified(HttpMethod method) 780public async Task MatchingBothConditionsReturnsNotModified(HttpMethod method) 796public async Task MatchingAtLeastOneETagReturnsNotModified(HttpMethod method) 819public async Task MissingEitherOrBothConditionsReturnsNormally(HttpMethod method) 863public async Task InvalidIfModifiedSinceDateFormatGivesNormalGet(HttpMethod method) 876public async Task FutureIfModifiedSinceDateFormatGivesNormalGet(HttpMethod method) 896public async Task IfModifiedSinceDateGreaterThanLastModifiedShouldReturn304(HttpMethod method) 912public async Task SupportsIfModifiedDateFormats(HttpMethod method) 937public async Task IfModifiedSinceDateLessThanLastModifiedShouldReturn200(HttpMethod method) 953public async Task InvalidIfUnmodifiedSinceDateFormatGivesNormalGet(HttpMethod method) 966public async Task FutureIfUnmodifiedSinceDateFormatGivesNormalGet(HttpMethod method) 978public async Task IfUnmodifiedSinceDateLessThanLastModifiedShouldReturn412(HttpMethod method) 1002var req1 = new HttpRequestMessage(HttpMethod.Get, "http://localhost/sample.txt"); 1006var req2 = new HttpRequestMessage(HttpMethod.Get, "http://localhost/sample.txt"); 1021new [] { HttpMethod.Get }, 1022new [] { HttpMethod.Head } 1027new [] { HttpMethod.Post }, 1028new [] { HttpMethod.Put }, 1029new [] { HttpMethod.Options }, 1030new [] { HttpMethod.Trace },
Microsoft.AspNetCore.StaticFiles.FunctionalTests (1)
StaticFileMiddlewareTests.cs (1)
201var request = new HttpRequestMessage(HttpMethod.Head, requestUrl);
Microsoft.AspNetCore.StaticFiles.Tests (49)
CacheHeaderTests.cs (25)
46public async Task IfMatchShouldReturn412WhenNotListed(HttpMethod method) 58public async Task IfMatchShouldBeServedWhenListed(HttpMethod method) 72public async Task IfMatchShouldBeServedForAsterisk(HttpMethod method) 84public async Task IfMatchShouldBeIgnoredForUnsupportedMethods(HttpMethod method) 110public async Task IfNoneMatchShouldReturn304ForMatching(HttpMethod method) 124public async Task IfNoneMatchAllShouldReturn304ForMatching(HttpMethod method) 138public async Task IfNoneMatchShouldBeIgnoredForNonTwoHundredAnd304Responses(HttpMethod method) 162public async Task ServerShouldReturnLastModified(HttpMethod method) 186public async Task MatchingBothConditionsReturnsNotModified(HttpMethod method) 205public async Task MatchingAtLeastOneETagReturnsNotModified(HttpMethod method) 231public async Task MissingEitherOrBothConditionsReturnsNormally(HttpMethod method) 280public async Task InvalidIfModifiedSinceDateFormatGivesNormalGet(HttpMethod method) 295public async Task FutureIfModifiedSinceDateFormatGivesNormalGet(HttpMethod method) 317public async Task IfModifiedSinceDateGreaterThanLastModifiedShouldReturn304(HttpMethod method) 336public async Task SupportsIfModifiedDateFormats(HttpMethod method) 364public async Task IfModifiedSinceDateLessThanLastModifiedShouldReturn200(HttpMethod method) 383public async Task InvalidIfUnmodifiedSinceDateFormatGivesNormalGet(HttpMethod method) 398public async Task FutureIfUnmodifiedSinceDateFormatGivesNormalGet(HttpMethod method) 413public async Task IfUnmodifiedSinceDateLessThanLastModifiedShouldReturn412(HttpMethod method) 432new [] { HttpMethod.Get }, 433new [] { HttpMethod.Head } 438new [] { HttpMethod.Post }, 439new [] { HttpMethod.Put }, 440new [] { HttpMethod.Options }, 441new [] { HttpMethod.Trace },
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 (3)
RequestBuilder.cs (3)
23_req = new HttpRequestMessage(HttpMethod.Get, path); 84_req.Method = HttpMethod.Get; 94_req.Method = HttpMethod.Post;
Microsoft.AspNetCore.TestHost.Tests (17)
ClientHandlerTests.cs (5)
219var message = new HttpRequestMessage(HttpMethod.Post, "https://example.com/"); 314var message = new HttpRequestMessage(HttpMethod.Post, "https://example.com/"); 342var message = new HttpRequestMessage(HttpMethod.Post, "https://example.com/"); 360HttpRequestMessage message = new HttpRequestMessage(HttpMethod.Post, "https://example.com/"); 497using (var message = new HttpRequestMessage(HttpMethod.Post, "https://example.com/"))
TestClientTests.cs (11)
196var httpRequest = new HttpRequestMessage(HttpMethod.Post, "http://localhost:12345"); 253var message = new HttpRequestMessage(HttpMethod.Post, "https://example.com/"); 304var httpRequest = new HttpRequestMessage(HttpMethod.Post, "http://localhost:12345"); 361var httpRequest = new HttpRequestMessage(HttpMethod.Post, "http://localhost:12345"); 423var httpRequest = new HttpRequestMessage(HttpMethod.Post, "http://localhost:12345"); 470var httpRequest = new HttpRequestMessage(HttpMethod.Post, "http://localhost:12345"); 521var httpRequest = new HttpRequestMessage(HttpMethod.Post, "http://localhost:12345"); 850var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost:12345"); 952var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost:12345"); 978var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost:12345"); 1005var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost:12345");
TestServerTests.cs (1)
790var request = new HttpRequestMessage(HttpMethod.Get, uri);
Microsoft.AspNetCore.WebSockets.Tests (7)
WebSocketCompressionMiddlewareTests.cs (3)
34using (var request = new HttpRequestMessage(HttpMethod.Get, uri.ToString())) 62using (var request = new HttpRequestMessage(HttpMethod.Get, uri.ToString())) 96using (var request = new HttpRequestMessage(HttpMethod.Get, uri.ToString()))
WebSocketMiddlewareTests.cs (4)
675using (var request = new HttpRequestMessage(HttpMethod.Get, uri.ToString())) 708using (var request = new HttpRequestMessage(HttpMethod.Get, uri.ToString())) 758using (var request = new HttpRequestMessage(HttpMethod.Get, uri.ToString())) 831using (var request = new HttpRequestMessage(HttpMethod.Get, uri.ToString()))
Microsoft.Build.Tasks.UnitTests (8)
DownloadFile_Tests.cs (8)
41RequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://largedownload/foo.txt") 70RequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://success/foo.txt") 104RequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://success/foo.txt") 149RequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://success/foo.txt") 222RequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://success/foo.txt") 296RequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://success/foo.txt") 332RequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://success/foo.txt") 355RequestMessage = new HttpRequestMessage(HttpMethod.Get, "http://unknown/")
Microsoft.DotNet.Build.Tasks.Feed (1)
src\CreateAzureDevOpsFeed.cs (1)
148using HttpRequestMessage createFeedMessage = new HttpRequestMessage(HttpMethod.Post, $"{AzureDevOpsProject}/_apis/packaging/feeds");
Microsoft.DotNet.Deployment.Tasks.Links (2)
Microsoft.DotNet.Git.IssueManager (1)
Clients\AzureDevOpsClient.cs (1)
34HttpRequestMessage getMessage = new HttpRequestMessage(HttpMethod.Get, $"_apis/git/repositories/{repoName}/commits?searchCriteria.ids={commit}");
Microsoft.DotNet.Helix.Sdk (7)
CheckAzurePipelinesTestResults.cs (4)
59HttpMethod.Get, 113HttpMethod.Get, 165HttpMethod.Get, 209HttpMethod.Get,
CreateFailedTestsForFailedWorkItems.cs (1)
40HttpMethod.Post,
FindDotNetCliPackage.cs (1)
266using var req = new HttpRequestMessage(HttpMethod.Head, uri);
StartAzurePipelinesTestRun.cs (1)
35HttpMethod.Post,
Microsoft.DotNet.Helix.Sdk.Tests (16)
FindDotNetCliPackageTests.cs (16)
27RequestMessage = new HttpRequestMessage(HttpMethod.Get, "https://dotnetcli.blob.core.windows.net/dotnet/Runtime/6.0.102/runtime-productVersion.txt"), 32RequestMessage= new HttpRequestMessage(HttpMethod.Head, "https://dotnetcli.blob.core.windows.net/dotnet/Runtime/6.0.102/dotnet-runtime-6.0.102-win-x86.zip"), 37RequestMessage = new HttpRequestMessage(HttpMethod.Get, "https://dotnetbuilds.blob.core.windows.net/public/Runtime/6.0.102/runtime-productVersion.txt"), 42RequestMessage = new HttpRequestMessage(HttpMethod.Head, "https://dotnetbuilds.blob.core.windows.net/public/Runtime/6.0.102/dotnet-runtime-6.0.102-win-x86.zip"), 75RequestMessage = new HttpRequestMessage(HttpMethod.Get, "https://fakeazureaccount.blob.core.windows.net/Runtime/6.0.102/runtime-productVersion.txt"), 80RequestMessage = new HttpRequestMessage(HttpMethod.Head, "https://fakeazureaccount.blob.core.windows.net/Runtime/6.0.102/dotnet-runtime-6.0.102-win-x86.zip"), 125RequestMessage = new HttpRequestMessage(HttpMethod.Get, "https://fakeazureaccount.blob.core.windows.net/Runtime/6.0.102/runtime-productVersion.txt"), 131RequestMessage = new HttpRequestMessage(HttpMethod.Head, "https://fakeazureaccount.blob.core.windows.net/Runtime/6.0.102/dotnet-runtime-6.0.102-win-x86.zip"), 178RequestMessage = new HttpRequestMessage(HttpMethod.Get, "https://dotnetcli.blob.core.windows.net/dotnet/Runtime/6.0.102/runtime-productVersion.txt"), 183RequestMessage= new HttpRequestMessage(HttpMethod.Head, "https://dotnetcli.blob.core.windows.net/dotnet/Runtime/6.0.102/dotnet-runtime-6.0.102-win-x86.zip"), 188RequestMessage = new HttpRequestMessage(HttpMethod.Get, "https://dotnetbuilds.blob.core.windows.net/public/Runtime/6.0.102/runtime-productVersion.txt"), 193RequestMessage = new HttpRequestMessage(HttpMethod.Head, "https://dotnetbuilds.blob.core.windows.net/public/Runtime/6.0.102/dotnet-runtime-6.0.102-win-x86.zip"), 244RequestMessage = new HttpRequestMessage(HttpMethod.Get, "https://dotnetcli.blob.core.windows.net/dotnet/Runtime/6.0.102/runtime-productVersion.txt"), 249RequestMessage = new HttpRequestMessage(HttpMethod.Head, "https://dotnetcli.blob.core.windows.net/dotnet/Runtime/6.0.102/dotnet-runtime-6.0.102-win-x86.zip"), 254RequestMessage = new HttpRequestMessage(HttpMethod.Get, "https://dotnetbuilds.blob.core.windows.net/public/Runtime/6.0.102/runtime-productVersion.txt"), 259RequestMessage = new HttpRequestMessage(HttpMethod.Head, "https://dotnetbuilds.blob.core.windows.net/public/Runtime/6.0.102/dotnet-runtime-6.0.102-win-x86.zip"),
Microsoft.DotNet.Internal.SymbolHelper (4)
SymbolPromotionHelper.cs (3)
146using HttpRequestMessage registerRequest = new(HttpMethod.Post, url) 200using HttpRequestMessage statusRequest = new(HttpMethod.Get, requestSpecificEndpoint) 263using HttpRequestMessage statusRequest = new(HttpMethod.Patch, requestSpecificEndpoint)
SymbolUploadHelperFactory.cs (1)
150using HttpRequestMessage getToolRequest = new(HttpMethod.Get, downloadUri) { Headers = { Accept = { new ("application/zip") } } };
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (16)
Languages\angular\Angular.cs (1)
345public static string Method(HttpMethod method)
Languages\csharp\CSharp.cs (6)
208public static string Method(HttpMethod method) 211if (method == HttpMethod.Delete || method == HttpMethod.Get || method == HttpMethod.Head || 212method.Method.ToLower() == "patch" || method == HttpMethod.Post || method == HttpMethod.Put)
Modeler\MethodModel.cs (2)
18HttpMethod httpMethod, 35public HttpMethod HttpMethod { get; }
Modeler\ServiceClientModelFactory.cs (7)
216private HttpMethod GetHttpMethod(OperationType type) 221return HttpMethod.Get; 223return HttpMethod.Put; 225return HttpMethod.Post; 227return HttpMethod.Delete; 229return HttpMethod.Options; 231return HttpMethod.Head;
Microsoft.Extensions.Http (6)
Logging\LogHelper.cs (6)
41private static readonly Action<ILogger, HttpMethod, string?, Exception?> _requestStart = LoggerMessage.Define<HttpMethod, string?>( 57private static readonly Func<ILogger, HttpMethod, string?, IDisposable?> _beginRequestPipelineScope = LoggerMessage.DefineScope<HttpMethod, string?>("HTTP {HttpMethod} {Uri}"); 59private static readonly Action<ILogger, HttpMethod, string?, Exception?> _requestPipelineStart = LoggerMessage.Define<HttpMethod, string?>(
Microsoft.Extensions.Http.Diagnostics (6)
Logging\Internal\HttpRequestBodyReader.cs (1)
49if (request.Content == null || request.Method == HttpMethod.Get)
Logging\Internal\Log.cs (4)
52[TagName(HttpClientLoggingTagNames.Method)] HttpMethod method, 60[TagName(HttpClientLoggingTagNames.Method)] HttpMethod method, 69[TagName(HttpClientLoggingTagNames.Method)] HttpMethod method, 77[TagName(HttpClientLoggingTagNames.Method)] HttpMethod method,
Logging\Internal\LogRecord.cs (1)
26public HttpMethod? Method { get; set; }
Microsoft.Extensions.Http.Diagnostics.PerformanceTests (4)
Benchmarks\HeadersReaderBenchmark.cs (1)
35Request = new HttpRequestMessage(HttpMethod.Post, "https://www.microsoft.com");
Benchmarks\HugeHttpCLientLoggingBenchmark.cs (1)
17private static HttpRequestMessage Request => new(HttpMethod.Post, "https://www.microsoft.com");
Benchmarks\MediumHttpClientLoggingBenchmark.cs (1)
17private static HttpRequestMessage Request => new(HttpMethod.Post, "https://www.microsoft.com");
Benchmarks\SmallHttpClientLoggingBenchmark.cs (1)
17private static HttpRequestMessage Request => new(HttpMethod.Post, "https://www.microsoft.com");
Microsoft.Extensions.Http.Diagnostics.Tests (60)
Latency\Internal\HttpLatencyTelemetryHandlerTest.cs (1)
59Method = HttpMethod.Post,
Logging\AcceptanceTests.cs (15)
47Assert.Equal($"{HttpMethod.Get} {_unreachableRequestUri.Host}/{TelemetryConstants.Redacted}", logRecord.Message); 80Assert.EndsWith($"{HttpMethod.Get} {_unreachableRequestUri.Host}/{TelemetryConstants.Redacted}", firstLogRecord.Message); 88Assert.Equal($"{HttpMethod.Get} {_unreachableRequestUri.Host}/{TelemetryConstants.Redacted}", secondLogRecord.Message); 109Method = HttpMethod.Get, 164Method = HttpMethod.Get, 180Method = HttpMethod.Get, 245Method = HttpMethod.Get, 267Method = HttpMethod.Get, 310Method = HttpMethod.Get, 357Method = HttpMethod.Get, 422Method = HttpMethod.Get, 591using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, _unreachableRequestUri); 617using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, _unreachableRequestUri); 640using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, _unreachableRequestUri); 681Method = HttpMethod.Get,
Logging\HttpClientLoggerTest.cs (19)
85Method = HttpMethod.Get, 123Method = HttpMethod.Get, 173Method = HttpMethod.Post, 185Method = HttpMethod.Post, 269Method = HttpMethod.Post, 281Method = HttpMethod.Post, 374Method = HttpMethod.Post, 386Method = HttpMethod.Post, 470Method = HttpMethod.Post, 482Method = HttpMethod.Post, 585Method = HttpMethod.Post, 597Method = HttpMethod.Post, 689Method = HttpMethod.Post, 732Method = HttpMethod.Post, 770Method = HttpMethod.Post, 814Method = HttpMethod.Post, 848Method = HttpMethod.Post, 864Method = HttpMethod.Post, 959Method = HttpMethod.Post,
Logging\HttpRequestBodyReaderTest.cs (9)
42Method = HttpMethod.Post 62Method = HttpMethod.Post 86Method = HttpMethod.Post 107Method = HttpMethod.Post 135Method = HttpMethod.Post 159Method = HttpMethod.Post 186Method = HttpMethod.Post 212Method = HttpMethod.Post 233Method = HttpMethod.Get
Logging\HttpRequestReaderTest.cs (16)
50Method = HttpMethod.Post, 82Method = HttpMethod.Post, 118Method = HttpMethod.Post, 145Method = HttpMethod.Post, 176Method = HttpMethod.Post, 208Method = HttpMethod.Post, 247Method = HttpMethod.Post, 283Method = HttpMethod.Post, 324Method = HttpMethod.Post, 355Method = HttpMethod.Post, 381Method = HttpMethod.Post, 413Method = HttpMethod.Post, 452Method = HttpMethod.Post, 484Method = HttpMethod.Post, 519Method = HttpMethod.Post, 551Method = HttpMethod.Post,
Microsoft.Extensions.Http.Polly.Tests (8)
DependencyInjection\PollyHttpClientBuilderExtensionsTest.cs (8)
108await Assert.ThrowsAsync<OverflowException>(() => client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "/throw"))); 146await Assert.ThrowsAsync<OverflowException>(() => client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "/throw"))); 231await Assert.ThrowsAsync<OverflowException>(() => client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "/throw"))); 278var response = await client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "/")); 323var response = await client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "/")); 366var request = new HttpRequestMessage(HttpMethod.Get, "http://host1/Service1/"); 375request = new HttpRequestMessage(HttpMethod.Get, "http://host1/Service1/"); 384request = new HttpRequestMessage(HttpMethod.Get, "http://host2/Service1/");
Microsoft.Extensions.Http.Resilience (2)
Internal\RequestMessageSnapshot.cs (1)
20private HttpMethod? _method;
Resilience\ResilienceHttpClientBuilderExtensions.Resilience.cs (1)
105using var request = new HttpRequestMessage(HttpMethod.Get, "https://localhost:123");
Microsoft.Extensions.Http.Resilience.PerformanceTests (4)
HedgingBenchmark.cs (1)
16private static HttpRequestMessage Request => new(HttpMethod.Post, _uri);
HttpResilienceBenchmark.cs (1)
27var request = new HttpRequestMessage(HttpMethod.Post, _uri);
RetryBenchmark.cs (1)
25private static HttpRequestMessage Request => new(HttpMethod.Post, _uri);
StandardResilienceBenchmark.cs (1)
25private static HttpRequestMessage Request => new(HttpMethod.Post, _uri);
Microsoft.Extensions.Http.Resilience.Tests (19)
Hedging\HedgingTests.cs (9)
83using var request = new HttpRequestMessage(HttpMethod.Get, "https://to-be-replaced:1234/some-path?query"); 123using var request = new HttpRequestMessage(HttpMethod.Get, "https://to-be-replaced:1234/some-path?query"); 142using var request = new HttpRequestMessage(HttpMethod.Get, "https://to-be-replaced:1234/some-path?query"); 164using var request = new HttpRequestMessage(HttpMethod.Get, "https://to-be-replaced:1234/some-path?query"); 189using var request = new HttpRequestMessage(HttpMethod.Get, "https://to-be-replaced:1234/some-path?query"); 213using var request = new HttpRequestMessage(HttpMethod.Get, "https://to-be-replaced:1234/some-path?query"); 237using var request = new HttpRequestMessage(HttpMethod.Get, "https://to-be-replaced:1234/some-path?query"); 265using var request = new HttpRequestMessage(HttpMethod.Get, "https://to-be-replaced:1234/some-path?query"); 289using var request = new HttpRequestMessage(HttpMethod.Get, "https://to-be-replaced:1234/some-path?query");
Hedging\StandardHedgingTests.cs (5)
223using var request = new HttpRequestMessage(HttpMethod.Get, "https://key:80/discarded"); 256using var firstRequest = new HttpRequestMessage(HttpMethod.Get, "https://to-be-replaced:1234/some-path?query"); 263using var secondRequest = new HttpRequestMessage(HttpMethod.Get, "https://to-be-replaced:1234/some-path?query"); 291using var request = new HttpRequestMessage(HttpMethod.Get, "https://some-endpoint:1234/some-path?query"); 338using var request = new HttpRequestMessage(HttpMethod.Get, $"https://{FailingEndpoint}:3000");
Resilience\HttpClientBuilderExtensionsTests.BySelector.cs (2)
38using var request = new HttpRequestMessage(HttpMethod.Head, url); 84using var request = new HttpRequestMessage(HttpMethod.Head, url);
Resilience\HttpClientBuilderExtensionsTests.Standard.cs (1)
41using var request = new HttpRequestMessage(HttpMethod.Get, url);
Resilience\RequestMessageSnapshotTests.cs (2)
24Method = HttpMethod.Get, 58Method = HttpMethod.Get,
Microsoft.Extensions.Logging.AzureAppServices (2)
BlobAppendReferenceWrapper.cs (2)
35var message = new HttpRequestMessage(HttpMethod.Put, _appendUri) 49var message = new HttpRequestMessage(HttpMethod.Put, _fullUri)
Microsoft.Extensions.ML (1)
ModelLoaders\UriModelLoader.cs (1)
109var headRequest = new HttpRequestMessage(HttpMethod.Head, uri);
Microsoft.Extensions.ServiceDiscovery.Tests (1)
ServiceEndpointResolverTests.cs (1)
198var httpRequest = new HttpRequestMessage(HttpMethod.Get, "http://basket");
Microsoft.ML.Tokenizers (1)
Utils\Helpers.netcoreapp.cs (1)
27HttpResponseMessage response = client.Send(new HttpRequestMessage(HttpMethod.Get, url), HttpCompletionOption.ResponseHeadersRead);
Negotiate.Client (3)
Controllers\AuthTestController.cs (3)
117result = await client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "auth/Unrestricted") { Version = GetProtocolVersion(protocol2) }); 150result = await client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "auth/Unrestricted") { Version = GetProtocolVersion(protocol2) }); 183result = await client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "auth/Authorized") { Version = GetProtocolVersion(protocol2) });
netstandard (1)
netstandard.cs (1)
1129[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.Http.HttpMethod))]
ServerComparison.FunctionalTests (6)
ResponseCompressionTests.cs (2)
167var request = new HttpRequestMessage(HttpMethod.Get, "NoAppCompression"); 199var request = new HttpRequestMessage(HttpMethod.Get, url);
ResponseTests.cs (4)
129var requestMessage = new HttpRequestMessage(HttpMethod.Get, "contentlength") 174var requestMessage = new HttpRequestMessage(HttpMethod.Get, "connectionclose") 199var requestMessage = new HttpRequestMessage(HttpMethod.Get, "chunked") 224var requestMessage = new HttpRequestMessage(HttpMethod.Get, "manuallychunked")
SocialSample (2)
Startup.cs (2)
137var request = new HttpRequestMessage(HttpMethod.Get, context.Options.UserInformationEndpoint); 198var request = new HttpRequestMessage(HttpMethod.Get, context.Options.UserInformationEndpoint);
Stress.AppHost (11)
Program.cs (7)
49serviceBuilder.WithHttpCommand("/write-console", "Write to console", method: HttpMethod.Get, iconName: "ContentViewGalleryLightning"); 50serviceBuilder.WithHttpCommand("/increment-counter", "Increment counter", method: HttpMethod.Get, iconName: "ContentViewGalleryLightning"); 51serviceBuilder.WithHttpCommand("/big-trace", "Big trace", method: HttpMethod.Get, iconName: "ContentViewGalleryLightning"); 52serviceBuilder.WithHttpCommand("/trace-limit", "Trace limit", method: HttpMethod.Get, iconName: "ContentViewGalleryLightning"); 53serviceBuilder.WithHttpCommand("/log-message", "Log message", method: HttpMethod.Get, iconName: "ContentViewGalleryLightning"); 54serviceBuilder.WithHttpCommand("/log-message-limit", "Log message limit", method: HttpMethod.Get, iconName: "ContentViewGalleryLightning"); 55serviceBuilder.WithHttpCommand("/multiple-traces-linked", "Multiple traces linked", method: HttpMethod.Get, iconName: "ContentViewGalleryLightning");
ResourceBuilderExtensions.cs (4)
14HttpMethod? method = default, 26HttpMethod? method = default, 36HttpMethod? method, 41method ??= HttpMethod.Post;
System.Net.Http (60)
src\libraries\Common\src\System\Net\Http\aspnetcore\Http3\QPack\H3StaticTable.Http3.cs (9)
11private static readonly Dictionary<HttpMethod, int> s_methodIndex = new Dictionary<HttpMethod, int> 14[HttpMethod.Delete] = 16, 15[HttpMethod.Get] = 17, 16[HttpMethod.Head] = 18, 17[HttpMethod.Options] = 19, 18[HttpMethod.Post] = 20, 19[HttpMethod.Put] = 21, 49public static IReadOnlyDictionary<HttpMethod, int> MethodIndex => s_methodIndex;
System\Net\Http\DiagnosticsHandler.cs (1)
116activity.DisplayName = HttpMethod.GetKnownMethod(request.Method.Method)?.Method ?? "HTTP";
System\Net\Http\DiagnosticsHelper.cs (3)
45internal static KeyValuePair<string, object?> GetMethodTag(HttpMethod method, out bool isUnknownMethod) 48HttpMethod? known = HttpMethod.GetKnownMethod(method.Method);
System\Net\Http\HttpClient.cs (9)
170HttpRequestMessage request = CreateRequestMessage(HttpMethod.Get, requestUri); 242HttpRequestMessage request = CreateRequestMessage(HttpMethod.Get, requestUri); 317HttpRequestMessage request = CreateRequestMessage(HttpMethod.Get, requestUri); 378SendAsync(CreateRequestMessage(HttpMethod.Get, requestUri), completionOption, cancellationToken); 391HttpRequestMessage request = CreateRequestMessage(HttpMethod.Post, requestUri); 407HttpRequestMessage request = CreateRequestMessage(HttpMethod.Put, requestUri); 423HttpRequestMessage request = CreateRequestMessage(HttpMethod.Patch, requestUri); 438SendAsync(CreateRequestMessage(HttpMethod.Delete, requestUri), cancellationToken); 813private HttpRequestMessage CreateRequestMessage(HttpMethod method, Uri? uri) =>
System\Net\Http\HttpMethod.cs (22)
9public partial class HttpMethod : IEquatable<HttpMethod> 14public static HttpMethod Get { get; } = new("GET", H3StaticTable.MethodGet); 15public static HttpMethod Put { get; } = new("PUT", H3StaticTable.MethodPut); 16public static HttpMethod Post { get; } = new("POST", H3StaticTable.MethodPost); 17public static HttpMethod Delete { get; } = new("DELETE", H3StaticTable.MethodDelete); 18public static HttpMethod Head { get; } = new("HEAD", H3StaticTable.MethodHead); 19public static HttpMethod Options { get; } = new("OPTIONS", H3StaticTable.MethodOptions); 20public static HttpMethod Trace { get; } = new("TRACE", http3StaticTableIndex: -1); 21public static HttpMethod Patch { get; } = new("PATCH", http3StaticTableIndex: -1); 25public static HttpMethod Connect { get; } = new("CONNECT", H3StaticTable.MethodConnect); 51public bool Equals([NotNullWhen(true)] HttpMethod? other) => 56obj is HttpMethod method && 71public static bool operator ==(HttpMethod? left, HttpMethod? right) => 76public static bool operator !=(HttpMethod? left, HttpMethod? right) => 79/// <summary>Parses the provided <paramref name="method"/> into an <see cref="HttpMethod"/> instance.</summary> 81/// <returns>An <see cref="HttpMethod"/> instance for the provided <paramref name="method"/>.</returns> 85/// if "get" is specified. For unknown methods, a new <see cref="HttpMethod"/> instance is returned, with the 88public static HttpMethod Parse(ReadOnlySpan<char> method) => 92internal static HttpMethod? GetKnownMethod(ReadOnlySpan<char> method) 96HttpMethod? match = (method[0] | 0x20) switch
System\Net\Http\HttpMethod.SocketsHttpHandler.cs (3)
51HttpMethod? knownMethod = GetKnownMethod(Method); 75HttpMethod? knownMethod = GetKnownMethod(Method); 99HttpMethod? knownMethod = GetKnownMethod(Method);
System\Net\Http\HttpRequestMessage.cs (6)
27private HttpMethod _method; 85public HttpMethod Method 120: this(HttpMethod.Get, (Uri?)null) 124public HttpRequestMessage(HttpMethod method, Uri? requestUri) 137public HttpRequestMessage(HttpMethod method, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri) 189internal bool IsExtendedConnectRequest => Method == HttpMethod.Connect && _headers?.Protocol != null;
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.cs (1)
784HttpRequestMessage tunnelRequest = new HttpRequestMessage(HttpMethod.Connect, _proxyUri);
System\Net\Http\SocketsHttpHandler\RedirectHandler.cs (6)
71Trace($"Modified request from {request.Method} to {HttpMethod.Get} in response to status code {(int)response.StatusCode} '{response.StatusCode}'.", request.GetHashCode()); 74request.Method = HttpMethod.Get; 145private static bool RequestRequiresForceGet(HttpStatusCode statusCode, HttpMethod requestMethod) 152return requestMethod == HttpMethod.Post; 154return requestMethod != HttpMethod.Get && requestMethod != HttpMethod.Head;
System.Net.Requests (4)
System\Net\HttpWebRequest.cs (4)
39private string _originVerb = HttpMethod.Get.Method; 1077if (string.Equals(HttpMethod.Get.Method, _originVerb, StringComparison.OrdinalIgnoreCase) || 1078string.Equals(HttpMethod.Head.Method, _originVerb, StringComparison.OrdinalIgnoreCase) || 1175_sendRequestMessage = new HttpRequestMessage(HttpMethod.Parse(_originVerb), _requestUri);
System.Net.WebSockets.Client (2)
System\Net\WebSockets\WebSocketHandle.Managed.cs (2)
87request = new HttpRequestMessage(HttpMethod.Connect, uri) { Version = HttpVersion.Version20 }; 92request = new HttpRequestMessage(HttpMethod.Get, uri) { Version = HttpVersion.Version11 };
Templates.Blazor.Tests (3)
BlazorWebTemplateTest.cs (1)
85var request = new HttpRequestMessage(HttpMethod.Get, new Uri(aspNetProcess.ListeningUri, "/_framework/blazor.boot.json"));
src\ProjectTemplates\Shared\AspNetProcess.cs (2)
137HttpMethod.Get, 265HttpMethod.Get,
Templates.Blazor.WebAssembly.Auth.Tests (2)
src\ProjectTemplates\Shared\AspNetProcess.cs (2)
137HttpMethod.Get, 265HttpMethod.Get,
Templates.Blazor.WebAssembly.Tests (2)
src\ProjectTemplates\Shared\AspNetProcess.cs (2)
137HttpMethod.Get, 265HttpMethod.Get,
Templates.Mvc.Tests (2)
src\ProjectTemplates\Shared\AspNetProcess.cs (2)
137HttpMethod.Get, 265HttpMethod.Get,
Templates.Tests (2)
src\ProjectTemplates\Shared\AspNetProcess.cs (2)
137HttpMethod.Get, 265HttpMethod.Get,