A Microsoft framework for building cross-platform mobile apps using .NET and C# with native performance and user interfaces.
Post request issue with some android devices (new or old) in Xamarin-forms cross platform project
I have encountered 404 error response when making Post requests to a specific API call on some Android devices. It does not happen with any of iOS devices. There are no error logs from the server-side. The issue was reported by some of the end-users. It does not happen all the time for some of those devices that encountered this issue, but a very small number of those devices actually encountered this issue 100% of the time when trying to make post request to said API. None of my test devices can't replicate the problem, so I can't think of any other way to try and solve this issue. Please advise.
Code snippet of the post request:
String postUrl = ConfigurationMyApp.MyAppBaseUrl + "api/MyAppApi/SaveData";
HttpContent contentPost = new StringContent(JsonConvert.SerializeObject(graniteSignOutForm), Encoding.UTF8, "application/json");
HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Post, postUrl);
request.Content = contentPost;
HttpResponseMessage httpResponseMessage = client.SendAsync(request, HttpCompletionOption.ResponseContentRead).Result;