05.11.2016, 11:25
One of these requests should work for you, don't forget to change the IP address as required.
Code:
local http = require('socket.http')
-- empty post body
http.request('http://192.168.1.1/relay/0?turn=on', '')
-- post instead of get
http.request('http://192.168.1.1/relay/0', 'turn=on')
-- post and get
http.request('http://192.168.1.1/relay/0?turn=on', 'turn=on')