How can I retrieve the REQUEST payload that is being sent over a CALL REST action

0
We are trying to process a PATCH request call whose request body is being built using the Export Mapping Structure. The Response is not stored/collected. For the purpose of troubleshooting, while we can view the sent Request body from the REST Consume Log nodes in Trace mode, we would like to save this information in an entity for later use of the admins. Can anyone please help in guiding a way to achieve this? From the documentation available in the given link below, I guess we can fetch it using the HTTPRequest entity but I am unsure of it’s usage: https://docs.mendix.com/refguide/http-request-and-response-entities#http-request Edit: Currently this has been implemented using the Export with Mapping Action to convert the Json into String and then added to a list. We are however looking for a more optimized way, if at all it exists. Thanks in advance!
asked
1 answers
2

If I understand this correctly, before you send the call you can use the export mapping action and just have it return a string.  The string will represent the body being sent to the endpoint.  From there you can save the string as an attribute to a persistent entity.  Hope this helps.

answered