Handling Special character $

Hi,

I am sending this request /account?$filter=ProfitCenter%20eq%20%27SAROB0001%27 from postman, but while reaching in apigee it is /account?%24filter=ProfitCenter%20eq%20%27SAROB0001%27

$ is changed to %24

I want to forward the query param $filter from request to target.

How can I forward that ?

 

Solved Solved
0 1 1,229
1 ACCEPTED SOLUTION

it should just work.  What problem are you seeing ?

The dollar sign is a special character and must be URL-encoded by HTTP clients like postman before sending. That turns $ into %24. The same encoding happens with other HTTP clients like curl or libraries built for languages like Java, C# or nodejs.  Apigee correctly receives the URL-encoded form of the query param.

Apigee will just pass that through to the upstream system.  There's nothing you need to do, to make that happen. In fact you have to modify the configuration of your proxy to make that NOT happen. The upstream system, if it is a compliant HTTP system, will automatically URL-decode the %24 correctly into a $. 

What specific problem are you seeing? 

If you look in Apigee trace , you may see the un-decoded value,  aka the encoded value, %24. That's not evidence of a problem. That's just display behavior. The correct decoding will happen at the receiver, at the right time. 

In my tests just now, my echo server that is upstream of Apigee correctly received a queryparam with a name that included the $ character.  Do you not observe that behavior?

 

View solution in original post

1 REPLY 1

it should just work.  What problem are you seeing ?

The dollar sign is a special character and must be URL-encoded by HTTP clients like postman before sending. That turns $ into %24. The same encoding happens with other HTTP clients like curl or libraries built for languages like Java, C# or nodejs.  Apigee correctly receives the URL-encoded form of the query param.

Apigee will just pass that through to the upstream system.  There's nothing you need to do, to make that happen. In fact you have to modify the configuration of your proxy to make that NOT happen. The upstream system, if it is a compliant HTTP system, will automatically URL-decode the %24 correctly into a $. 

What specific problem are you seeing? 

If you look in Apigee trace , you may see the un-decoded value,  aka the encoded value, %24. That's not evidence of a problem. That's just display behavior. The correct decoding will happen at the receiver, at the right time. 

In my tests just now, my echo server that is upstream of Apigee correctly received a queryparam with a name that included the $ character.  Do you not observe that behavior?