Prevent Apigee from encoding query string values with comma in it before sending it to target API...

Hi,

I am working a proxy pointing to PeopleSoft/Oracle Query Access Service . we have few REST APIs implemented.

The backend API requires query string with comma separated value (below exmaple). it works like this when I make a call from postman.

{URI}isconnectedquery=N&maxrows=0&prompt_uniquepromptname=FROM_CUR,TO_CUR,RT_TYPE,EFFDT&prompt_fieldvalue=USD,SGD,CRRNT,20170909

I created a proxy for this but when Apigee sends the request to Target service, the URL is encoded and backend doesn't decode it and returns error message back. Following is what I got from trace.

{URI}?isconnectedquery=N&maxrows=0&prompt_uniquepromptname=FROM_CUR%2CTO_CUR%2CRT_TYPE%2CEFFDT&prompt_fieldvalue=USD%2CSGD%2CCRRNT%2C20170909

How can I prevent Apigee from doing encoding for this proxy?

0 1 1,027
1 REPLY 1

Hi @Surabhi.gupta,

Apigee edge encoding the commas is standard http behaviour. Only special characters allowed in a uri are ? & and = . Any other special character has to be encoded. This behavior cannot change.

Looking at the scenario you mentioned uniquepromptname looks to be an array. Then the correct way to pass it in uri would be like this : uniquepromptname=FROM_CUR&uniquepromptname=TO_CUR etc.

In case it is not an array and the complete string needs to contain commas, then the only way to handle this would be have decoding capability in the provider API.