Forum Discussion
Hey DougS ,
Is there any update regarding what you have mentioned in your comment because I couldn't find anything related to "get request body in the endpoint" in the current 19.4 and 19.5 release notes. I am also stuck with the same issue mentioned above about how to get payload of a Webhook's POST request in an endpoint. If you can provide any update on this then it will be really helpful.
Thanks in advance.
We actually added this back in 19.2, but looks like it didn't make it into any release notes or into our Freemarker documentation -- I will make sure this gets added to our Freemarker documentation. In the meantime, you should be able to do this to parse JSON out of the request body:
<#assign requestBody = http.request.body />
<#assign requestBodyObj = utils.json.fromJson(requestBody) />
(Please note that the http.request.body object will only work when used in Endpoints -- it will throw an exception if used in a component on a community page)
-Doug
Related Content
- 9 years ago
- 12 years ago