Real Time Automation, Inc.
53
1-800-249-1612
have a “filename” parameter or argument. This is ignored by the 460WI when processi
ng an incoming
POST.
Additionally, it is important to use the correct URL when posting data to the Encoder using the
multipart/form method.
For XML, use the following URL:
http://
[Gateway’s IP]
/gateway/xml
For JSON, use the following URL:
http://
[Gateway’
s IP]
/gateway/json
The application/x-www-form-urlencoded Method
The application/x-www-form-urlencoded post method is commonly used for submitting data to
websites.
The URL path format for an urlencoded
post has the form:
/gateway/device/
[DEVICE NAME]
?
[POINT 1 NAME]
=
[POINT 1 VALUE]
&
[POINT 2 NAME]
=
[POINT 2
VALUE]
Note that the URL path string begins with a question mark (?) after the device name, and more points
may be added, separating each point=value pair with an ampersand (&). Also notice that unlike GET
requests to read data from a device configured in the gateway, the encoding segment of the path (JSON
or XML) is omitted in this case.
There is no hard limit to the number of points that can be written with a single urlencoded post, but the
urlencoded string should not exceed 16,000 characters. As an extreme example, if the data points all
have 32-character names and contain STRING data values that are 255 characters long, the individual
POST would have to be limited to 50 data points.
Note that the urlencoded format requires the usage of the percent-encoding mechanism for data to be
processed properly. In almost all cases, the actual percent-encoding will be handled transparently by
your application, scripting language or library, but you should keep the possible length increase that is a
side-effect or percent-encoding in mind. It is recommended to leave some headroom because certain
characters, for example the quotation mark (“) character will be encoded as “%22” and therefore
consume three characters rather than one. In the case of the 460WI, this is generally only a concern for
STRING data point types. Refer to