beautypg.com

Url encoding data, Example transactions, Kdt750 apl guide – AML KDT750 Price Verification System User Manual

Page 21

background image

KDT750 APL Guide

3 - 3

URL Encoding Data

APL will URL encode data being sent to the server-side script, and the server should URL
encode all replies. That is, all data in a single ITEM=VALUE pair should be URL encoded, leav-
ing the new line between ITEM=VALUE pairs intact as ASCII.

URL encoding is necessary to allow passing special characters that are normally not allowed
in URL data. These characters include:

space $ & < > ? ; # : = , " ' ~ + %

To URL encode a special character, replace the character with a '%' followed by the two
ASCII characters that represent the hex encoded value of the character to URL encode. For
example, to URL encode an ampersand, the

& would be replaced with %26.

URL encoded carriage return characters within a VALUE of an output field will be translated
into a new line when displayed.

Example Transactions

A bar code containing the data “1641115” was scanned with the internal bar code reader.
The server responds with a price field and description field.

Note that all data strings are URL encoded. See Appendix A for more examples.

Request:

BAR=164%2d1115

Reply:

Content-type: text/html

PRC=0.187

DES=Screw.%20Torx%2C%20Plastic%20Thrd%2C%200-4