I am trying to get the html body of the view on post but my body is always empty. below is my code.
[HttpPost]
public async Task<IActionResult> GetPdf()
{
var request = HttpContext.Request.Body;
using (var bodyReader = new StreamReader(request))
{
string body = await bodyReader.ReadToEndAsync();
//request.Body = new MemoryStream(Encoding.UTF8.GetBytes(body));
}
}