I am using the HttpClient PostAsync method by passing requestUri and content but get a very generic error message:
One or more errors occurred
Could you please guide me. Not sure what might be causing this. When I use the same requestUri and content in postman it works as expected.
var client = new HttpClient();
var content = new StringContent(authXML);
content.Headers.ContentType = new MediaTypeHeaderValue("application/xml");
client.BaseAddress = new Uri(authorizationUri);
var result = client.PostAsync(authorizationUri, content).Result; //Generic error message "One or more errors occurred"
if (response.IsSuccessStatusCode)
{
// SUCCESS
// Do Something
}
else
{
// ERROR
// Do Something
}