Apigee normally URL encoded the parameters without configuring anything. But, If you are configured the “conf/http.properties+HTTPClient.urlencode.request.line=false” property in message-processor.properties, then Apigee will not getting URL encoding some special characters especially in . Then to get URL encode, please configure “conf/http.properties+HTTPClient.urlencode.request.line=true” this property. Then, It will get a URL encoding of special characters especially in .
For Example :
The servicecallout policy configuration:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
Service Callout-1
POST
application/x-www-form-urlencoded
Hello, Fabian having a nice day
Hello,%20Fabian%20having%20a%20nice%20day
wZ9xNh8TE{mNX+[8
true
calloutResponse
http://httpbin.org/post
Here, you can find “Hello,%20Fabian%20having%20a%20nice%20day” and “wZ9xNh8TE{mNX+[8” values in above servicecallout policy configuration. These parameter values are not URL encoding, when “conf/http.properties+HTTPClient.urlencode.request.line=false” property configured in message-processor.properties file.
Otherwise, Apigee will normally getting URL encoding (or) you need to change the property as “conf/http.properties+HTTPClient.urlencode.request.line=true” from “false” in message-processor.properties, then URL encoding works.
When “conf/http.properties+HTTPClient.urlencode.request.line=false” property is configured in message-processor.properties,
The response as,
{
“args”: {},
“data”: “”,
“files”: {},
“form”: {
“case”: “wZ9xNh8TE{mNX [8”,
“encode”: “Hello, Fabian having a nice day”,
“sub”: “Hello, Fabian having a nice day”
},
“headers”: {
“Content-Length”: “106”,
“Content-Type”: “application/x-www-form-urlencoded”,
“Host”: “httpbin.org”,
“X-Amzn-Trace-Id”: “Root=1-6181979f-160e072c61f678e97b776a78”
},
“json”: null,
“origin”: “34.76.144.115”,
“url”: “http://httpbin.org/post”
}