Creating a GET Command from a URL.

Tutorials for working with our software
Locked
User avatar
DemoPad
Site Admin
Posts: 711
Joined: Thu Jun 14, 2012 10:46 am
Contact:

Creating a GET Command from a URL.

Post by DemoPad » Mon Jul 16, 2012 4:51 pm

Often it is better to use GET commands instead of sending a URL command directly to a website. GET commands differ from normal URL's in that they do not have to wait for a reply from the website in order to be completed this means that the DemoPad app will not stop working while the command is waiting for a reply. This is helpful as if the URL does not get to the website it can lock up the DemoPad app until it times out.

To turn URL into a GET Command it must turn from this format (This only an example, it wont do anything):
to this format:
GET /getvariables/home.html HTTP/1.0\x0D\x0A
Simply take whatever comes after the main website address (or in some cases IP address) and put them between the word GET and the HTTP part of the GET request.

Note - some devices require a HTTP 1.1 specification command, which has extra parameters (Host etc) - please refer to general HTTP documentation for more information.

From here you can assign the commands to buttons as normal apart from the fact that when creating a device you must enter the website (or IP Address) as the address for the device.

Locked