Question to lua-socket http request

I captured the message below and I’m trying to send it via lua-socket in a script in my vera. Unfortunately I’m not able to do so.

SUBSCRIBE /Event/org.mpris.MediaPlayer2.mansion/RygelAVTransport HTTP/1.1 HOST: CALLBACK: <> NT: upnp:event TIMEOUT: Second-300

I tried following script in the “Develop apps” → "Test Luup code (Lua)"editor. Can somebody please help me.

[code]-- loads the HTTP module and any libraries it requires
local http = require(“socket.http”)
local ltn12 = require(“ltn12”)

h = http.request { method = “SUBSCRIBE”,
url = “

h = {
useragent = “/Event/org.mpris.MediaPlayer2.mansion/RygelAVTransport HTTP/1.1”
[“HOST”] = “”,
[“CALLBACK”] = “”,
[“NT”] = “upnp:event”,
[“TIMEOUT”] = “Second-300”,

Kind regards,