Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

How to handle Query params with special characters

Not applicable

Hi folks,

I want to pass the comma separated query paramerters to the target endpoint url, hence i have tried to do it with below mentioned 2 ways.

1. In Proxy Endpoints Preflow, Tried to get the params from the request url and set the Query params via Assign Message policy in order to pass it as a query params to the target endpoint url

2. In Target Endpoints Preflow, Tried to get the params from the request url inside javascript and made a new target url there by embedding comma separated query params to the target endpoint url and further assigning it to the 'target.url' apigee variable.

I'm yet unable to hit the target url properly because while apigee hits this new target url, it replaces query param commas with %2C

eg. https://hostname:port/basepath?q=q1,q2,q3

getting converted to

https://hostname:port/basepath?q=q1%2Cq2%2Cq3

Because of the above change not getting the desired response as backend is not able to resolve %2C%2C.

Can anyone pl help here?

1 1 21.9K
1 REPLY 1