How to get webhook request header and body, Body coming fine when using [FromBody].
What class can we use to get both headers and body
please check my below code.
public class WebhookController : ApiController
{
[HttpPost]
[ActionName("webhookcallback")]
public HttpResponseMessage GetWebhookData([FromBody]object response)
{
var _request = Request;
var headers = _request.Headers; // custom header values not coming
return Request.CreateResponse(HttpStatusCode.OK, "SUCCESS");
}
}
Thanks, Ajay