How to get POST request RAW JSON from exposed REST API?

How to get POST request RAW JSON from exposed REST API?

  

I have exposed REST API with POST method.

However if input parameter is set to Text, and third party application are sending "Content-Type: application/json" in header, then Outsystems will return HTTP 415 error message.

According to this documentation, I need to use record or list data type for input parameter to accept application/json.

https://www.outsystems.com/help/servicestudio/9.0/Integrating_with_other_systems/Web_Services/Supported_Media_Types_in_REST_API_Requests.htm

However, third party application that consuming my REST API, have dynamic JSON, so I need to parse it manually.

So, how to get unparsed/raw JSON data?

Solution

Solved: I use OnRequest event, and got unparsed JSON data from Request.RequestText input parameter...

Solution