Hi everyone. What should I assign to the CustomizedRequest field in the On Request (Rest API) action? The documentation says: "Make sure to set the CustomizedRequest output to the request after your preprocessing." Does this mean I should pass the original request, or the request after any preprocessing/modifications have been applied? Could someone provide an example?
Hello @cvnh,
The point of CustomizedRequest is to modify the actual request before sending it to its destination.
For example, imagine you have an API that expects:
POST /api/Customer with this request: { "Name": "Test"}
Everything is already configured, but the API also requires a custom header:
Authorization: Bearer 123456
You can use CustomizedRequest to add this header before the request is sent.
So the final request will be: POST /api/CustomerAuthorization: Bearer 123456{ "Name": "Test"}
Another example suppose your request is: GET /api/Customer
But you want to dynamically add a parameter: GET /api/Customer?Country=UAE
CustomizedRequest can be used to modify the request before it reaches the API.
In simple terms, CustomizedRequest allows you to take the request you are about to send and modify it like adding a header before it reaches the API.