Operation
X-320M™ User's Manual
3.3 GET Requests
3.3.1 Using GET for Control and Monitoring
No Password
GET requests to the device for XML files.
Example request about.html:
GET /about.html HTTP/1.1\r\n\r\n
Example turn Output 1 On:
GET /state.xml?relay1State=1\r\n\r\n
Password Enabled
If the Control Password is enabled on X-320M™ and the state.xml page is requested through a browser,
the user will be prompted for a password. If the XML request is sent from an XML application, the html
request will need to contain the password, encoded as Base64.
The following is an html request header without the password:
GET /state.xml?relay1State=1&noReply=1 HTTP/1.1 (Terminated with two \r\n.)
The following example adds the password:
GET /state.xml?relay1State=1&noReply=1 HTTP/1.1 (Terminated with \r\n.)
Authorization: Basic bm9uZTp3ZWJyZWxheQ== (Terminated with two \r\n.)
bm9uZTp3ZWJyZWxheQ==
is the Base64 encoded version of the user “name:password,”
none:webrelay.
A utility is provided at http://www.controlbyweb.com/encoder to encode the password. Simply type the
string username:password into the website and press 'Encode'.
Page 96
Xytronix Research & Design, Inc.
Summary of Contents for X-320m
Page 1: ......