Revision 2.6
3.2.3 GET Requests
GET requests can be used by custom applications to monitor and control the relays. A few
example GET requests are provided below.
No Password Enabled:
GET requests to the device for specific files.
Example: Request home.html
GET /home.html HTTP/1.1\r\n\r\n
Example: Turn Relay 1 ON
GET /state.xml?relay1State=1 HTTP/1.1\r\n\r\n
Password Enabled:
If the control password is enabled in the WebRelay-Quad™ unit and the XML page is requested
through a browser, the browser will prompt the user for the password. If the XML request is sent
from another application and not a browser, the html request will need to contain the password
encoded using the base 64 encoding scheme. The html request header without the password
looks like this:
GET /state.xml?noReply=1 HTTP/1.1 (Terminated with two \r\n)
The html request header with the password looks like this:
GET /state.xml?relay2State=1&noReply=1 HTTP/1.1 (Terminated with one \r\n)
Authorization: Basic bm9uZTp3ZWJyZWxheQ== (Terminated with two \r\n\)
where bm9uZTp3ZWJyZWxheQ== is the base 64 encoded version of the username and password
none:webrelay.
A utility is provided at http://www.ControlByWeb.com/encoder that can be used to encode the
password. The utility is used by simply typing the string username:password into the website and
pressing encode.
Xytronix Research & Design, Inc.
WebRelay-Quad™ Users Manual
page 31
Need help?
Do you have a question about the WebRelay-Quad X-WR-4R1-5 and is the answer not in the manual?