179 references to PostAsync
Aspire.Dashboard.Tests (10)
Integration\FrontendBrowserTokenAuthTests.cs (1)
145var response = await client.PostAsync("/api/validatetoken?token=" + requestToken, content: null).DefaultTimeout();
Integration\OtlpHttpServiceTests.cs (8)
47var responseMessage = await httpClient.PostAsync("/v1/logs", content).DefaultTimeout(); 73var responseMessage = await httpClient.PostAsync("/v1/logs", content).DefaultTimeout(); 117var responseMessage = await httpClient.PostAsync("/v1/logs", content).DefaultTimeout(); 207var responseMessage = await httpClient.PostAsync("/v1/logs", content).DefaultTimeout(); 237var responseMessage = await client.PostAsync("/v1/logs", content).DefaultTimeout(); 287var responseMessage = await client.PostAsync("/v1/logs", content).DefaultTimeout(); 316var responseMessage = await client.PostAsync("/v1/traces", content).DefaultTimeout(); 345var responseMessage = await client.PostAsync("/v1/metrics", content).DefaultTimeout();
Integration\StartupTests.cs (1)
407responseMessage = await httpClient.PostAsync("/v1/logs", content);
Aspire.Hosting.PostgreSQL.Tests (1)
PostgresFunctionalTests.cs (1)
178var response = await client.PostAsync("/api/connect", httpContent);
Diagnostics.EFCore.FunctionalTests (6)
DatabaseErrorPageMiddlewareTest.cs (1)
300response = await client.PostAsync("http://localhost" + expectedMigrationsEndpoint, formData);
MigrationsEndPointMiddlewareTest.cs (5)
126.PostAsync("http://localhost" + path, formData); 161var response = await server.CreateClient().PostAsync("http://localhost" + MigrationsEndPointOptions.DefaultPath, formData); 193var response = await server.CreateClient().PostAsync("http://localhost" + MigrationsEndPointOptions.DefaultPath, formData); 222var response = await server.CreateClient().PostAsync("http://localhost" + MigrationsEndPointOptions.DefaultPath, formData); 262await server.CreateClient().PostAsync("http://localhost" + MigrationsEndPointOptions.DefaultPath, formData));
IIS.FunctionalTests (21)
src\Servers\IIS\IIS\test\Common.FunctionalTests\CompressionTests.cs (1)
142var response = await client.PostAsync("ReadAndWriteEchoLines", new StringContent(messages));
src\Servers\IIS\IIS\test\Common.FunctionalTests\Inprocess\MaxRequestBodySizeTests.cs (5)
44var result = await deploymentResult.HttpClient.PostAsync("/ReadRequestBody", new StringContent("test")); 64var result = await deploymentResult.HttpClient.PostAsync("/ReadRequestBody", new StringContent("test")); 87var result = await deploymentResult.HttpClient.PostAsync("/ReadRequestBodyLarger", new StringContent(new string('a', 100000000))); 108var result = await deploymentResult.HttpClient.PostAsync("/ReadRequestBodyLarger", new StringContent(new string('a', 10000))); 154var result = await deploymentResult.HttpClient.PostAsync("/IncreaseRequestLimit", new StringContent("1"));
src\Servers\IIS\IIS\test\Common.FunctionalTests\MaxRequestBodySizeTests.cs (5)
45var result = await deploymentResult.HttpClient.PostAsync("/ReadRequestBody", new StringContent("test")); 65var result = await deploymentResult.HttpClient.PostAsync("/ReadRequestBody", new StringContent("test")); 88var result = await deploymentResult.HttpClient.PostAsync("/ReadRequestBodyLarger", new StringContent(new string('a', 100000000))); 109var result = await deploymentResult.HttpClient.PostAsync("/ReadRequestBodyLarger", new StringContent(new string('a', 10000))); 155var result = await deploymentResult.HttpClient.PostAsync("/IncreaseRequestLimit", new StringContent("1"));
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestResponseTests.cs (8)
165var response = await _fixture.Client.PostAsync("ReadAndWriteSynchronously", content); 177var response = await _fixture.Client.PostAsync("ReadAndWriteEcho", content); 188var response = await _fixture.Client.PostAsync("ReadAndWriteCopyToAsync", content); 199var response = await _fixture.Client.PostAsync("ReadAndWriteEchoTwice", content); 210var response = await _fixture.Client.PostAsync("SetHeaderFromBody", content); 453var result = await _fixture.Client.PostAsync($"/TestReadOffsetWorks", new StringContent("Hello World")); 483var result = await _fixture.Client.PostAsync($"/TestValidReadOperations{operation}", new StringContent("hello")); 509var result = await _fixture.Client.PostAsync($"/TestValidWriteOperations/NullBufferPost", new StringContent("hello"));
src\Servers\IIS\IIS\test\Common.FunctionalTests\WebSocketTests.cs (2)
43using var response = await client.PostAsync(Fixture.DeploymentResult.ApplicationBaseUri + "WebSocketNotUpgradable", new StringContent("Hello World")); 58using var response = await client.PostAsync(Fixture.DeploymentResult.ApplicationBaseUri + "WebSocketUpgradable", new StringContent(""));
IISExpress.FunctionalTests (21)
src\Servers\IIS\IIS\test\Common.FunctionalTests\CompressionTests.cs (1)
142var response = await client.PostAsync("ReadAndWriteEchoLines", new StringContent(messages));
src\Servers\IIS\IIS\test\Common.FunctionalTests\Inprocess\MaxRequestBodySizeTests.cs (5)
44var result = await deploymentResult.HttpClient.PostAsync("/ReadRequestBody", new StringContent("test")); 64var result = await deploymentResult.HttpClient.PostAsync("/ReadRequestBody", new StringContent("test")); 87var result = await deploymentResult.HttpClient.PostAsync("/ReadRequestBodyLarger", new StringContent(new string('a', 100000000))); 108var result = await deploymentResult.HttpClient.PostAsync("/ReadRequestBodyLarger", new StringContent(new string('a', 10000))); 154var result = await deploymentResult.HttpClient.PostAsync("/IncreaseRequestLimit", new StringContent("1"));
src\Servers\IIS\IIS\test\Common.FunctionalTests\MaxRequestBodySizeTests.cs (5)
45var result = await deploymentResult.HttpClient.PostAsync("/ReadRequestBody", new StringContent("test")); 65var result = await deploymentResult.HttpClient.PostAsync("/ReadRequestBody", new StringContent("test")); 88var result = await deploymentResult.HttpClient.PostAsync("/ReadRequestBodyLarger", new StringContent(new string('a', 100000000))); 109var result = await deploymentResult.HttpClient.PostAsync("/ReadRequestBodyLarger", new StringContent(new string('a', 10000))); 155var result = await deploymentResult.HttpClient.PostAsync("/IncreaseRequestLimit", new StringContent("1"));
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestResponseTests.cs (8)
165var response = await _fixture.Client.PostAsync("ReadAndWriteSynchronously", content); 177var response = await _fixture.Client.PostAsync("ReadAndWriteEcho", content); 188var response = await _fixture.Client.PostAsync("ReadAndWriteCopyToAsync", content); 199var response = await _fixture.Client.PostAsync("ReadAndWriteEchoTwice", content); 210var response = await _fixture.Client.PostAsync("SetHeaderFromBody", content); 453var result = await _fixture.Client.PostAsync($"/TestReadOffsetWorks", new StringContent("Hello World")); 483var result = await _fixture.Client.PostAsync($"/TestValidReadOperations{operation}", new StringContent("hello")); 509var result = await _fixture.Client.PostAsync($"/TestValidWriteOperations/NullBufferPost", new StringContent("hello"));
src\Servers\IIS\IIS\test\Common.FunctionalTests\WebSocketTests.cs (2)
43using var response = await client.PostAsync(Fixture.DeploymentResult.ApplicationBaseUri + "WebSocketNotUpgradable", new StringContent("Hello World")); 58using var response = await client.PostAsync(Fixture.DeploymentResult.ApplicationBaseUri + "WebSocketUpgradable", new StringContent(""));
Interop.FunctionalTests (5)
HttpClientHttp2InteropTests.cs (5)
1290var requestTask = client.PostAsync(url, new StringContent("Hello World")).DefaultTimeout(); 1330var response = await client.PostAsync(url, new ByteArrayContent(new byte[1024 * 18])).DefaultTimeout(); 1433var requestTask = client.PostAsync(url, streamingContent); 1518var requestTask0 = client.PostAsync(url, streamingContent0); 1519var requestTask1 = client.PostAsync(url, streamingContent1);
Microsoft.AspNetCore.Authentication.Test (6)
OpenIdConnect\OpenIdConnectEventTests.cs (1)
1313return client.PostAsync("signin-oidc",
OpenIdConnect\OpenIdConnectEventTests_Handler.cs (1)
1311return client.PostAsync("signin-oidc",
WsFederation\WsFederationTest.cs (2)
146var exception = await Assert.ThrowsAsync<AuthenticationFailureException>(() => httpClient.PostAsync(httpClient.BaseAddress + "signin-wsfed", form)); 156var response = await httpClient.PostAsync(httpClient.BaseAddress + "signin-wsfed", form);
WsFederation\WsFederationTest_Handler.cs (2)
144var exception = await Assert.ThrowsAsync<AuthenticationFailureException>(() => httpClient.PostAsync(httpClient.BaseAddress + "signin-wsfed", form)); 154var response = await httpClient.PostAsync(httpClient.BaseAddress + "signin-wsfed", form);
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (3)
Logging\AcceptanceTests.cs (3)
173using var response = await client.PostAsync("/", content).ConfigureAwait(false); 233using var response = await client.PostAsync("/", content).ConfigureAwait(false); 670using var response = await client.PostAsync("/", content).ConfigureAwait(false);
Microsoft.AspNetCore.Identity.FunctionalTests (2)
MapIdentityApiTests.cs (2)
676AssertUnauthorizedAndEmpty(await client.PostAsync("/identity/manage/2fa", null)); 687AssertBadRequestAndEmpty(await client.PostAsync("/identity/manage/2fa", null));
Microsoft.AspNetCore.Mvc.FunctionalTests (79)
AntiforgeryAuthTests.cs (3)
35var response = await Client.PostAsync("http://localhost/Home/AutoAntiforgery", null); 58var response = await Client.PostAsync("http://localhost/Antiforgery/Index", content: null); 68var response = await Client.PostAsync("http://localhost/IgnoreAntiforgery/Index", content: null);
ApiBehaviorTest.cs (1)
207var response = await Client.PostAsync(url, new StringContent(string.Empty));
ApiExplorerTest.cs (4)
1326var response = await Client.PostAsync( 1357var response = await Client.PostAsync( 1392var response = await Client.PostAsync( 1508var response = await Client.PostAsync(
AuthMiddlewareAndFilterTestBase.cs (1)
279var response = await Client.PostAsync($"Login/{action}", null);
AuthMiddlewareUsingRequireAuthTest.cs (1)
81var response = await Client.PostAsync($"Login/{action}", null);
BasicTests.cs (5)
404var response = await Client.PostAsync("/Home/Product", new FormUrlEncodedContent(product)); 536var response = await Client.PostAsync("BindProperties/Action", new FormUrlEncodedContent(formContent)); 559var response = await Client.PostAsync("BindProperties/Action", new FormUrlEncodedContent(formContent)); 581var response = await Client.PostAsync("BindProperties/Action", new FormUrlEncodedContent(formContent)); 601var response = await Client.PostAsync("BindPropertiesSupportsGet/Action", new FormUrlEncodedContent(formContent));
ControllerFromServicesTests.cs (1)
95var response = await Client.PostAsync(
GlobalAuthorizationFilterTestBase.cs (1)
64var response = await Client.PostAsync("http://localhost/Administration/SignInCookie2", null);
InputFormatterTests.cs (7)
48var response = await Client.PostAsync("http://localhost/Home/Index", content); 64var response = await Client.PostAsync("http://localhost/InputFormatter/ReturnInput/", content); 81var response = await Client.PostAsync("http://localhost/InputFormatter/ReturnInput/", content); 231var response = await Client.PostAsync($"Home/{nameof(HomeController.DefaultBody)}", content); 276var response = await Client.PostAsync($"Home/{nameof(HomeController.OptionalBody)}", content); 291var response = await Client.PostAsync($"Home/{nameof(HomeController.DefaultValueBody)}", content); 306var response = await Client.PostAsync($"Home/{nameof(HomeController.NullableBody)}", content);
InputObjectValidationTests.cs (9)
78var response = await Client.PostAsync("http://localhost/Validation/Index", content); 100var response = await Client.PostAsync("http://localhost/Validation/Index", content); 121var response = await Client.PostAsync("http://localhost/Validation/GetDeveloperName", content); 141var response = await Client.PostAsync("http://localhost/Validation/CreateProject", content); 167var response = await Client.PostAsync( 192var response = await Client.PostAsync("http://localhost/Validation/GetDeveloperAlias", content); 210var response = await Client.PostAsync( 230var response = await Client.PostAsync( 251var response = await Client.PostAsync(
InputParentValidationTests.cs (2)
51var response = await Client.PostAsync("http://localhost/Validation/CreateInvalidModel", content); 70var response = await Client.PostAsync("http://localhost/Validation/CreateInvalidModel", content);
InputValidationTests.cs (2)
50var response = await Client.PostAsync("http://localhost/TopLevelValidation", content); 85var response = await Client.PostAsync("http://localhost/TopLevelValidation", content);
JsonInputFormatterTestBase.cs (5)
50var response = await Client.PostAsync("http://localhost/Home/Index", content); 69var response = await Client.PostAsync("http://localhost/JsonFormatter/ReturnInput/", content); 87var response = await Client.PostAsync("http://localhost/JsonFormatter/ValueTypeAsBody/", content); 103var response = await Client.PostAsync("http://localhost/JsonFormatter/ValueTypeAsBody/", content); 207var response = await Client.PostAsync("http://localhost/JsonFormatter/ReturnInput/", content);
NewtonsoftJsonInputFormatterTest.cs (3)
19var response = await Client.PostAsync("http://localhost/JsonFormatter/ReturnInput/", content); 38var response = await Client.PostAsync("http://localhost/JsonFormatter/ReturnNonNullableInput/", content); 55var response = await Client.PostAsync("http://localhost/JsonFormatter/ReturnInput/", content);
RazorBuildTest.cs (2)
180var response = await Client.PostAsync($"/UpdateableViews/Update", updateContent); 186var response = await Client.PostAsync($"/UpdateableViews/UpdateRazorPages", new StringContent(string.Empty));
RazorPagesTest.cs (1)
1221var response = await Client.PostAsync("/Pages/Admin/Edit", new StringContent(""));
RazorRuntimeCompilationHostingStartupTest.cs (2)
125var response = await Client.PostAsync($"/UpdateableViews/Update", updateContent); 131var response = await Client.PostAsync($"/UpdateableViews/UpdateRazorPages", new StringContent(string.Empty));
RemoteAttributeValidationTest.cs (1)
99var response = await Client.PostAsync(url, content);
RequestFormLimitsTest.cs (6)
48var response = await Client.PostAsync( 69var response = await Client.PostAsync( 95var response = await Client.PostAsync( 118var response = await Client.PostAsync( 144var response = await Client.PostAsync( 165var response = await Client.PostAsync(
RequestSizeLimitTest.cs (2)
46var response = await Client.PostAsync( 68var response = await Client.PostAsync(
SimpleWithWebApplicationBuilderTests.cs (2)
273var response = await Client.PostAsync("/fileupload", content); 289var response = await Client.PostAsync("/fileupload", content);
TagHelpersTest.cs (2)
241var response = await Client.PostAsync("http://localhost/Employee/Create", postContent); 269var response = await Client.PostAsync("http://localhost/Employee/Create", postContent);
TempDataInCookiesTest.cs (2)
124var response = await Client.PostAsync("/TempData/SetTempData", content); 177var response = await Client.PostAsync($"{protocol}://localhost/TempData/SetTempData", content);
TempDataInCookiesUsingCookieConsentTest.cs (1)
80var response = await Client.PostAsync("/TempData/SetTempData", content);
TempDataPropertyTest.cs (4)
45var redirectResponse = await Client.PostAsync("TempDataProperty/CreateForView", content); 73var redirectResponse = await Client.PostAsync("TempDataProperty/Create", content); 102var response = await Client.PostAsync("TempDataProperty/CreateNoRedirect", content); 139var response = await Client.PostAsync("TempDataProperty/CreateNoRedirect", content);
TempDataTestBase.cs (5)
46var response = await Client.PostAsync("/TempData/SetTempData", content); 77var response = await Client.PostAsync("/TempData/DisplayTempData", content); 96var response = await Client.PostAsync("/TempData/SetTempData", content); 127var response = await Client.PostAsync("/TempData/SetTempData", content); 167var redirectResponse = await Client.PostAsync("/TempData/SetTempDataMultiple", content);
TestingInfrastructureTests.cs (1)
160var response = await Client.PostAsync(
XmlDataContractSerializerInputFormatterTest.cs (1)
43var response = await Client.PostAsync("http://localhost/Home/Index", content);
XmlSerializerInputFormatterTests.cs (2)
44var response = await Client.PostAsync("http://localhost/Home/Index", content); 61var response = await Client.PostAsync("http://localhost/Home/Index", content);
Microsoft.AspNetCore.OutputCaching.Tests (2)
OutputCacheTests.cs (2)
71var initialResponse = await client.PostAsync("", new StringContent(string.Empty)); 72var subsequentResponse = await client.PostAsync("", new StringContent(string.Empty));
Microsoft.AspNetCore.ResponseCaching.Tests (2)
ResponseCachingTests.cs (2)
75var initialResponse = await client.PostAsync("", new StringContent(string.Empty)); 76var subsequentResponse = await client.PostAsync("", new StringContent(string.Empty));
Microsoft.AspNetCore.Routing.FunctionalTests (1)
MinimalFormTests.cs (1)
723var response = await client.PostAsync("/", null);
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (8)
DelegateTests.cs (1)
278var response = await client.PostAsync(uri, content);
HttpsTests.cs (1)
291HttpResponseMessage response = await client.PostAsync(uri, new StringContent(upload));
Listener\RequestBodyTests.cs (2)
178var responseTask = client.PostAsync(address, content); 205HttpResponseMessage response = await client.PostAsync(uri, content);
Listener\ServerOnExistingQueueTests.cs (1)
327HttpResponseMessage response = await client.PostAsync(uri, new StringContent(upload));
RequestBodyLimitTests.cs (1)
415HttpResponseMessage response = await client.PostAsync(uri, content);
RequestBodyTests.cs (1)
303HttpResponseMessage response = await client.PostAsync(uri, content);
ServerTests.cs (1)
649HttpResponseMessage response = await client.PostAsync(uri, new StringContent(upload));
Microsoft.AspNetCore.TestHost.Tests (5)
ClientHandlerTests.cs (3)
141return httpClient.PostAsync("http://example.com", content); 174return httpClient.PostAsync("http://example.com", new UnlimitedContent()); 194return httpClient.PostAsync("http://example.com", content);
TestClientTests.cs (1)
117var response = await client.PostAsync("http://localhost:12345", content).DefaultTimeout();
TestServerTests.cs (1)
225var response = await server.CreateClient().PostAsync("/", new StreamContent(stream));
Microsoft.DotNet.VersionTools (6)
Automation\GitHubApi\GitHubClient.cs (4)
169using (HttpResponseMessage response = await _httpClient.PostAsync(pullUrl, bodyContent)) 286using (HttpResponseMessage response = await _httpClient.PostAsync(url, bodyContent)) 327using (HttpResponseMessage response = await _httpClient.PostAsync(url, bodyContent)) 352using (HttpResponseMessage response = await _httpClient.PostAsync(url, bodyContent))
Automation\VstsApi\VstsAdapterClient.cs (2)
135using (HttpResponseMessage response = await _httpClient.PostAsync(pullUrl, bodyContent)) 271using (HttpResponseMessage response = await _httpClient.PostAsync(pullUrl, bodyContent))
System.Net.Http (1)
System\Net\Http\HttpClient.cs (1)
65/// e.g.: <see cref="GetAsync(string?)" />, <see cref="PostAsync(string?, HttpContent)" />.