Running PreRequest Script In HTTP Request

How to run pre-request script in API call (HTTP request)?

Postman has a feature to send pre-request scripts to an API. Since this is an additional feature on top of API requests our UiPath HTTP request activity can not send these pre-requests but there is a workaround to achieve the same functionality.

  1. If it is a simple JS script then Inject Script activities can be used.
  2. Use node JS script and then Invoke it using PowerShell activity.
  3. Check if there are any equivalent class libraries available in C# or VB then try to achieve the same functionality using Invoke code activity.