I have a .net core 3.1 web api. I have tried the following but it always turns up null when it hits it
[HttpPost]
public IActionResult ReturnXmlDocument(HttpRequestMessage request)
{
var doc = new XmlDocument();
doc.Load(request.Content.ReadAsStreamAsync().Result);
return Ok(doc.DocumentElement.OuterXml.ToString());
}
It doent even hits it during debugging also it shows a 415 error in fiddler.