AspNetCore.Docs
AspNetCore.Docs copied to clipboard
Post requests
It would be nice to show how to send post requests as well. I'm not even sure how to do it, as there seems to be 2 ways: creating a StringContent type and using PostAsync (l tested this and it works), but also change the verb in the HttpRequestMessage object to post and using the SendAsync (?) as normal (but where is the payload? I don't understand how to do it this way)
Dokumentinformasjon
⚠ Ikke rediger denne delen. Den kreves for koblingen docs.microsoft.com ➟ GitHub-problem.
- ID: 881cef77-11ef-ac11-06d0-0996a1ccfa1b
- Version Independent ID: 3d356334-e672-7e8b-1fef-7944ebee99eb
- Content: Make HTTP requests using IHttpClientFactory in ASP.NET Core
- Content Source: aspnetcore/fundamentals/http-requests.md
- Product: aspnet-core
- Technology: aspnetcore-fundamentals
- GitHub Login: @stevejgordon
- Microsoft Alias: scaddie
Dup of #12580 Hopefully that will be addressed.