Apigee is HTML encoding "&" when AssignMessage defines multiple QueryParam

Not applicable

I have an AssignMessage policy which defines multiple QueryParams. Apigee is HTML encoding the "&" character used to separate query parameters to & which is resulting in the request being rejected by the backend

0 3 370
3 REPLIES 3

@Suhas Chatekar , Welcome to Apigee community.

Can you please post your AssignMessage policy ? You need to set query params using different xml elements in policy. Please post assign message policy you are using to better understand same.

@Anil Sagar Here is the relevant part from my policy. Note that I have tried both `Copy` and `Set`


<Copy> <QueryParams> <QueryParam name="clientcode">{request.queryparam.clientcode}</QueryParam> <QueryParam name="id">{request.queryparam.id}</QueryParam> </QueryParams> </Copy>

@Anil Sagar I managed to investigate this further. Here is my finding. When I used LocalTargetConnection from ServiceCallout policy in order to call a proxy endpoint locally, that is when the & symbols are getting html encoded to &. If I call the same API proxy externally by using <HTTPTagetEndpoint>/<URL> then it works fine. Is this is a bug?