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?
http encoding question
Moderator: Martin
Re: http encoding question
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.
encodeURLForm 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
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.
encodeURLForm 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