REST API GET method - input in request body
Question

Hi All, 

I'm trying to consume a REST API which is having requests in the body for the GET method. There are many posts mentioning that it is not the recommended way, but there is no other alternative in the current case. Kindly let me know if any workaround to pass the request body in JSON format to the service.


Thanks in advance.


Priya


Hi Priya,

 "Kindly let me know if any workaround to pass the request body in JSON format to the service. "

- There are not many ways I am aware of. You could theoretically try doing something in the OnBeforeRequest, but it would be confusing and I don't see a reason how it could make the things better.

In the end, if the Service you are consuming is written this way, there is no way around it. Just pass the parameters/structures to the wrapping Server/Service Action as input and inside populate the REST call however you should in your case.;)

Champion

Hi,

You may try the below :

Approach-1
- Instead of using Outsystems REST; use Custom Javascript API Script. You can write it & Execute it.

Approach-2
I- Not sure, but u can check the OnBeforeRequest;

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.