squirreltown
13 years agoRoku Guru
RSS parse
I have an rss feed working fine from an http GET request from the Roku. I am trying to change it to http POST. I am getting an error and the feed isnt being parsed. I know the rss feed is outputting t...
"squirreltown" wrote:
yea I actually got that part right this time. This same function works fine if I change the POST stuff to GET, which is the way it is normally.
Ive just changedm.http.SetUrl(feed_url)
tostrx = ReadAsciiFile("tmp:/apfavorites")
m.http.SetUrl(feed_url)
m.http.AsyncPostFromString("AID=" + strx)
andxml=m.http.GetToString()
towhile true
msg = Wait(8000, m.port )
If msg = invalid Then
print "Error: invalid"
Else If Type( msg ) = "roUrlEvent" Then
if msg.GetString()
xml= msg.GetString()
End If
end if
...............
it prints the error and crashes on the next block because the xml variable is empty
xml = m.http.GetToString()with:
xml = m.http.PostFromString("AID=" + strx)and see if it works. That's swapping synchronous for synchronous...