davide.graziani | 2024-09-16 12:11:58 UTC | #1
Hello! I'm trying to configure an API calls to an endpoint in GET:
domainname/phpapi/api-clients.php?listinname=PHONE|COUNTRY&listin_value=123456789|FR
the problem is when I try to test the call I got the message:
"Failed due to malformed requestUrlTemplate. Illegal character in query at index 73: https://domainname/phpapi/api-clients.php?listinname=PHONE|COUNTRY&listin_value=123456789|FR"
seems is the "|" the issue. I have already tried with some of Velocity macros also the one below:
listinname=$salesforce.escReserved(${input.listinname})&listinvalue=$salesforce.escReserved(${input.listinvalue})
but I got the same issue. any idea? Thanks! davide
GregP | 2024-09-16 13:45:39 UTC | #2
I believe the issue is that you're not using the unicode for the "|" character like you would do for a space (%20). The unicode for the pipe symbol is | so try %124 and see if that fixes it.
davide.graziani | 2024-09-16 15:37:43 UTC | #3
GregP, post:2, topic:29337
%124
Ciao Greg, using %7C it works...but how to replace dynamically "|" with "%7C" in the Action setup?
davide.graziani | 2024-09-16 15:42:20 UTC | #4
Hello, I found the solution using the macro $esc.url():
api-clients.php?listinname=$esc.url(${input.listinname})&listinvalue=$esc.url(${input.listinvalue})
Thanks! davide
system | 2024-10-17 15:42:37 UTC | #5
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 29337