Reputation: 17388
I have a restful webservice which receives some structured data which is put straight into a database.
The data is send from an OS using wget. I am just wondering whether I actually need to URL encode the data and if so why? Please note that it is no problem to do it but it might be uneccessary in this scenario.
Upvotes: 5
Views: 2052
Reputation: 10008
If your data has characters that aren't allowed in urls, you should url encode it.
The following characters are either reserved (like &) or just present the possibility of confusing code. If your data contains these characters, urlencode it. Remember if you are using any extended ascii characters, unicode characters or non-printable characters you should url-encode your data.
More info can be found here: http://www.blooberry.com/indexdot/html/topics/urlencoding.htm
Upvotes: 4