Get DocuSign Connect Webhook message on .NET Core API POST action method

I have integrated DocuSign connect (REST v2.1) with my .NET Core 5 project. But I am not sure how to get the notification body once the Webhook sends its request to the POST URL I have configured.


I was able to resolve the issue using the below code.

if (!Request.Body.CanSeek) { Request.EnableBuffering(); } 
Request.Body.Position = 0; 
var reader = new StreamReader(Request.Body, Encoding.UTF8); 
var body = await reader.ReadToEndAsync().ConfigureAwait(false);