We see a '\' getting added to a text field in our response body in apigee. how do we avoid it?

Not applicable

We see a '\' getting added to a text field in our response body in apigee. For example our provider is sending us a text field as "Rs2/EerZXd" but Apigee is returning it to the consumer as "Rs2\/EerZXd". In the API proxy we are just mapping the data that we get from the provider to the consumer.

1 1 121
1 REPLY 1

Not applicable

we can use the java script to fix it.i have the similar rrequirment i extract the response to a extract variable and apply the java script to it.sample code giving below.

var myvar=context.getVariable("APIesponse.body"); myvar=myvar.replace("\n","\\n","g"); context.setVariable("APIresponse.body",myvar);