The return-mode parameter
Return-mode can be one of two values, either ‘url’ or ‘plain’ (excluding the quotes).
The premium SMS platform provided by aql.com is a flexible way of receiving messages via short codes, identifying the source network provider and sending the appropriate billing messages to gain revenue.
Although we do offer the standard HTTP gateway, we do prefer that your application uses the HTTPS gateway as it prevents sensitive details being sniffed across the internet.
The return value from the gateway will be in the format of a http query string, for example:
Many languages provide an easy mechanism to decode the contents of such a string. For example:
Using ‘plain’ instructs the gateway that you would like the response to be in the default format. If you also set the return-format parameter, the gateway will return the data back to you in the format you provide in the return-format parameter (see below).
The return-format parameter
This parameter is only used if the return-mode parameter is set to ‘plain’. This parameter allows you to set the format of the string returned back to you in the event of a success only. You simply need to embed the appropriate variables.
Assume the gateway provides the variables status, description, longitude and latitude.
If you would like all the variables returned to you on a single line separated by a colon, you would use the following string:
The gateway will replace %<variable_name>% with the contents of variable_name.
This would result in a response similar to:
Note: Because you will be sending the request to us via HTTP, the whole of the return-format parameter would need to be URL encoded. For this example, the urlencoded version is: