Nor really sure if I am doing this right or not, must not be since it's not working. I am sending a request to my server to save the info. Each piece of info is an array that is formatjson and escaped.
ut = CreateObject("roURLTransfer")
ut.SetPort(CreateObject("roMessagePort"))
myname = FormatJson(name)
myposter= FormatJson(hdposterUrl)
mystream= FormatJson(stream)
mygid= FormatJson(gid)
mynameJsonEscaped = ut.Escape(myname)
myposterJsonEscaped= ut.Escape(myposter)
mystreamJsonEscaped= ut.Escape(mystream)
mygidJsonEscaped= ut.Escape(mygid)
url="http://xxx.xxx.x.xxx:8000/Favorite/myCreate.php?filename="+myfile + "&channel=" + mynameJsonEscaped + "&hdposterUrl=" + myposterJsonEscaped + "&stream=" + mystreamJsonEscaped + "&gid=" + mygidJsonEscaped
If ut.AsyncPostFromString(url) Then
event=wait(timeout, ut.GetPort())
if type(event)= "roUrlEvent"
print event.GetResponseCode()
if event.GetResponseCode()= 200
result=event.PostFromString(url)
?result
m.urlCode=event.GetResponseCode()
m.failure=event.GetFailureReason()
return m.urlCode
else
m.urlCode=event.GetResponseCode()
?"FAILURE CODE "m.urlCode
return result
end if
elseif event = invalid
ut.AsyncCancel()
endif
end if
I can't seem to get it to work. I can copy the completed url from debugger and past into browser with approx 10 elements in each array and it works. Anything more it doesn't work or crashes browser. When ran on roku I get a -3 back. Any guidance appreciated.