Hi All, We are sending some data through the query parameter in url which has some special characters like { },[], ". Example url : /content/abc/test.html?data={"title":"Get%20a%20Quote%20-%20Compare%20Plans%20and%20Prices","travelers":[{"age":20,"sameAddress":true,"tripCost":300}]}. converted url - /content/abc/test.html?data=%7b%2522title%2522:%2522Get%2520a%2520Quote%2520-%2520Compare%2520Plans%2520and%2520Prices%2522.... In our QA publish url it is working fine, but in the dispatcher url these special characters are getting converted into their hex-code equivalent. So can you please do let me know what rewrite rules and which file we do need to write in dispatcher to avoid those special characters to getting converted to their hex-code?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
Avoid encoding dispatcher URLs -
AddDefaultCharset utf-8
Making sure you have utf-8 encoding enabled.
I recommend you to pass the JSON object in request body not in query params. And use POST method for these type of requests.
Hi,
Avoid encoding dispatcher URLs -
Views
Replies
Total Likes
The short, right answer for the question itself is the apache rewrite NE flag.
The long answer... is that you shouldn't send JSON objects in URLs for many many reasons. Some options:
1. Use a POST
2. Save that JSON in the browser session or local storage and read it on the next page.
3. At least transform that JSON in "normal" URL params and pass that...