on 2023 Feb 23 10:22 AM
Hi,
In SAP IRPA automation
I'm sending a get request to my CAP service in one of my automation using 'CALL web service with destination'
in the first step I'm giving the parameters for the web service call
return { 'url': '/mrorequestdolphin/MaintenanceRequests?$filter=to_requestStatus_rStatusDesc eq \'Revision & Event Created\'', 'method': 'GET', headers: { 'Accept' : 'application/json', 'Content-Type': 'application/json' }, 'responseType':'json', // parse the body of the result as a JSON object 'resolveBodyOnly':true // get only the body of the response};
Here in the url when we give '&' directly we are getting an error 'Bad Request'
So I have tried giving URI encoding of & '%26'
although there is no error the query is not working as the response is blank.
Similarly I have tried using the method encodeURIComponent() but the result is same as before no response
Note: I have tried with other values in the URL without ampersand and the automation works fine and gives the desired result the problem arises when I tried using & in the URL
Please help me in resolving this issue
Regards,
Request clarification before answering.
Hi all,
i am having the same problem.
Even i am sending S%26A for S&A when building the URI through the SAP Web IDE, the value it is not converted when arriving to the backend.
My URI is
https://hidden.com:9999/sap/opu/odata/sap/Z_SRV/TestEntSet ?$filter=field1 eq 'AA' and field2 eq 'B' and field3 eq 'S%26P_TYPE'
My expectation is to see in the backend
https://hidden.com:9999/sap/opu/odata/sap/Z_SRV/TestEntSet ?$filter=field1 eq 'AA' and field2 eq 'B' and field3 eq 'S&P_TYPE'
but what i am still receiving in the backed S%26P_TYPE without the conversion.
Regards
Rob
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Akash,
I'm facing exact issue trying to encode ":" in the URl I need to use encodeURIComponent() but I couldn't find it in the iRPA core I only find the function encodeURI which doesn't encode characters like ":" . can you please tell me how did you used encodeURIComponent() in iRPA ?
thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you try to encode only the & character or the whole url?
I've had similar issues with trying to add an url as attachment to an invoice. I never managed to get past this encoding problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
66 | |
9 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.