Advanced Customizations
When using a REST API, you can use your own .NET/Java code to customize the information that is sent in requests or received in responses. For example, to use a specific algorithm to code some content, or to add a certificate at a very low level of the request.
For that, do the following:
-
In Integration Studio, create an extension to map the .NET/Java code into Service Studio actions. Use the REST Extensibility API in your extension to obtain and manipulate requests/responses. To see examples of how to use the REST Extensibility API, search for modules that use REST APIs in the Components category of OutSystems Forge.
-
In Service Studio, add references to the actions you need from the extension.
-
In the REST API, use the following properties:
-
On Before Request property: set to
OnBeforeRequestAdvanced
to customize the request before it is sent. -
On After Response property: set to
OnAfterResponseAdvanced
to customize the response after it has arrived.
-
-
After setting the value, an action with the same name is made available under the REST API.
-
Double-click the newly created action to edit it.
-
Use the referenced extension actions to customize the request or response using your .NET/Java code.