Questions tagged [postasync]
21 questions
0
votes
3 answers
Sending a Post Request to register a new user to a Web API, but receiving 400 : BadRequest
Having issues with my code [ Throwing an Unhandled exception: System.Net.Http.HttpRequestException: Response status code does not indicate success: 400 (Bad Request) ] when trying to connect to WebApi
This is my first time working with await/async…

lane23
- 11
- 2
0
votes
1 answer
Set lease for build with Azure DevOps API in C#
If the right condition I will make a call to my Azure DevOps server, to set a build to not be deleted.
I followed: https://learn.microsoft.com/en-us/rest/api/azure/devops/build/leases/add?view=azure-devops-rest-6.0
I have some C# code where I try to…

JerryA
- 153
- 1
- 8
0
votes
1 answer
PostAsync call vanishes and web page becomes available again
I have a web page that I'm trying to call a web service and I'm having it skip out of the process when called.
Here's what I'm referring to...
When I call this method after the customer enters in their check information:
public CheckInfo…

ErocM
- 4,505
- 24
- 94
- 161
0
votes
1 answer
xamarin.forms httpclient.PostAsync not working on xamarin.ios (ios 14) but works on xamarin.android
Below is my Code
try
{
var json = JsonConvert.SerializeObject(dtr);
var content = new StringContent(json, Encoding.UTF8, "application/json");
//This line below works on android but not on ios 14 devices , no exception…

Dodong
- 39
- 1
- 7
0
votes
1 answer
C# HttpClient.PostAsJsonAsync Failing with Internal Server Error
I am trying to call an api using HttpClient PostAsJsonAsync. However, I'm getting a StatusCode 500 Internal Server Error and I cannot figure out why after countless hours of research and various attempts.
Here is my attempt:
public async Task…

Jason247
- 974
- 4
- 16
- 38
0
votes
0 answers
Calling POST API in ASP.Net MVC with Payload Body Content
I have a 3rd party API as shown in below image.
I'm trying to call this API in ASP.Net MVC controller as below:
public ActionResult GetQuickCatalogueAsync(string category = "f97b9ec8-5e74-4f20-8582-471d067fc6c4")
{
using (var…

Unknown Coder
- 1,510
- 2
- 28
- 56