Recent

Author Topic: Network device control by http. LNet.  (Read 4583 times)

HenkNL

  • New member
  • *
  • Posts: 9
Network device control by http. LNet.
« on: August 15, 2010, 07:13:11 pm »
I have a network device that is controlled by http commands or even by browser. It is a RF remote power-switch controller. So i can remotely switch the power for electrical equipment.

First I used Synapse for this. But I really like to use Lnet for this.

Synapse:

Code: [Select]
procedure TForm1.Button1Click(Sender: TObject);
begin
  http.HTTPMethod('GET', 'http://192.168.1.42/preset?switch=1&value=ON');

end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  http.HTTPMethod('GET', 'http://192.168.1.42/preset?switch=1&value=OFF');

end;

How to do this in Lnet ? I have seen the fpget.pp example but that seems so more complicated than Synapse.

Henk


 

TinyPortal © 2005-2018