What is URL encoding?
URL encoding converts special characters into friendly HTTP GET request that can be sent through the internet. You should use URL encode for all GET parameters.
Why URL encoding?
The data you’re sending to a web service using HTTP Get request must be encoded, any character that is not an alphabetic character, a number, or a special character that is being used outside its normal context is going to need to be encoded in your request.
URLs often contain characters which conflict with HTTP Get request reserved characters such as (&, /, ?) must be escaped.
How do you encode a URL?
To encode a URL, you simply replace the special characters with their encoding string. This will nearly always begin with a % character.
All modern programming languages offer libraries to encode URLs, such in C# use HttpUtility.UrlEncode() and PHP: string urlencode (string $str).
Example:
GET
https://msgapi.wire2air.com/smsapi/submitsm.aspx?vasid=yourvasid&userid=YourAuthKey&password=yourpassword&from=27126&to=9999999999&text=A sample text & Message
GET
https://msgapi.wire2air.com/smsapi/submitsm.aspx?vasid=yourvasid&userid=YourAuthKey&password=yourpassword&from=27126&to=9999999999&text=A%20sample%20text%20%26%20Message
Text=A sample text & Message encoded to : A%20sample%20text%20%26%20Message