Page 1 of 1
http encoding question
Posted: 12 Dec 2014 06:22
by rsegoly
I need to send this value on http request
http://yozmaportal.net/put_in_cell.php? ... lue=python on.py
But I get an error of illegal character in query.
Do I need to encode somehow?
Re: http encoding question
Posted: 12 Dec 2014 16:42
by Martin
Hi,
Do you mean the space between python and on.py? Spaces in the query part of the URL should be escaped using +:
http://yozmaportal.net/put_in_cell.php? ... thon+on.py
You can also use functions
encodeURL(variable_name) or
encodeURLForm(variable_name) when the value is coming from a variable.
encodeURL
Form can be used when the you are adding a parameter to the query part of the request (after ?) other parts of the url should usually be escaped using
encodeURL.
Regards,
Martin