So you want to convert this iMacros code for use with UI.vision RPA software?
Two options:
(1) You can re-use the iMacros Javascript 1:1 with no changes in the ExecuteScript command.
(2) Easier: UI.Vision can run scripts directly with XRUN. This way you can use for example cURL directly from RPA!