Http request via Lua

I have 2 veras on the same LAN.
I’m trying to get a PLEG condition to action an HTTP address of the following:

local status, result = luup.inet.wget(“http://VERA_IP:3480/data_requestid=action&output_format=xml&DeviceNum=24&serviceId=urn:upnp-org:serviceId:VSwitch1&action=SetTarget&newTargetValue=0”, 10)

The "http://… string works on a web browser, but i can’t get vera to action the request.

Am i using the right language?
thanks.

You’re missing a ‘?’ after the data_request. Should be more like this…

http://vera_ip:3480/data_request?id=action&output_format=xml&DeviceNum=24&serviceId=urn:upnp-org:serviceId:VSwitch1&action=SetTarget&newTargetValue=0

good spot.
Still invalid Lua action from vera (and doesn’t work)

its of trial and error and got it working now with this:

local url = require(“socket.url”)
luup.inet.wget(“http://versa_ip:3480/data_request?id=action&output_format=xml&DeviceNum=271&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=1”)