httpclient PostAsync returns status 200 ok, but in response received as requested url rejected.
Note: I am able to get the data successfully when tested with Postman
code
var httpClient = new HttpClient();
httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", accessToken);
//stringDetails is a Class object containing fields
var stringDetails = JsonConvert.SerializeObject(stringDetails);
var httpContent = new StringContent(stringDetails, Encoding.UTF8, "application/json");
var httpResponse = await httpClient.PostAsync(webApiUrl, httpContent);
var responseContent = await httpResponse.Content.ReadAsStringAsync();
I am adding the code screenshot below for your reference.
Received response in Postman


