Revision 1.1 WebSwitch™ Users Manual3.2.2 GET RequestsGET requests can be used by custom applications to request information from the device, setparameters, and control the Outlets.No Password EnabledGET requests to the device for XML files:Example: Request about.htmlGET /about.html HTTP/1.1\r\n\r\nExample: Turn Outlet 1 ONGET /state.xml?relay1State=1 HTTP/1.1\r\n\r\nPassword EnabledIf the control password is enabled in WebSwitch™ unit and the state.xml page is requested through abrowser, the browser will prompt the user for the password. If the XML request is sent from anotherapplication and not a browser, the html request will need to contain the password encoded using thebase 64 encoding scheme. The html request header without the password looks like this:GET /state.xml?relay1State=1&noReply=1 HTTP/1.1 (Terminated with two \r\n\)The html request header with the password looks like this:GET /state.xml?relay1State=1&noReply=1 HTTP/1.1 (Terminated with \r\n)Authorization: Basic bm9uZTp3ZWJzd210Y2g= (Terminated with two \r\n)where bm9uZTp3ZWJzd2l0Y2g= is the base 64 encoded version of the user name and passwordnone:webswitchA utility is provided at http://www.controlbyweb.com/encoder to encode the password. Simply type thestring username:password into the website and press 'encode'.Xytronix Research & Design, Inc. 68