I am sending following URL via postman. The url parameter value ‘name=satheesh#kumar’ contains # symbol.
https://wci-nonprod-qa.apigee.net/v1/cleanse-match/cleansematch?name=satheesh#kumar
When apigee receives the request the value ‘#kumar’ got stripped off. Other symbols [!”£$..etc] are getting encoded except #.
PFA. Please let me know why its ‘#kumar’ getting removed from URL ? is it a apigee bug or something else?
Solved! Go to Solution.
The hashmark (#) has a special meaning in URLs. It has meaning to the client but not to the server, so the server strips it off and ignores it.
If the hash mark is part of your data, it should be sanitized in the same way you sanitize any data sent as part of a query string. In this case, you should replace "#" with "%23" in your query string.
# is a separator for URL fragment -- you probably need to URL encode it if you want it to be a value of a queryparam -- %23
Postman may not automatically encode, since it thinks its a fragment
The hashmark (#) has a special meaning in URLs. It has meaning to the client but not to the server, so the server strips it off and ignores it.
If the hash mark is part of your data, it should be sanitized in the same way you sanitize any data sent as part of a query string. In this case, you should replace "#" with "%23" in your query string.
Like to reconfirm my understanding on your suggestion - This [replace "#" with "%23"] should be done in client end right ?
Affirmative. If you are using JavaScript, for example, you can sanitize any individual element of your query string using the encodeURIComponent() function.
# is a separator for URL fragment -- you probably need to URL encode it if you want it to be a value of a queryparam -- %23
Postman may not automatically encode, since it thinks its a fragment
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |