Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
mitchstein
Roku Guru

Simple http missing something...

request.SetMessagePort(port)
request.SetUrl("http://www.tvbydemand.com/video_update_views.asp?vpath=" & episode.url) (the error appears to be at the &)

what I'm trying to do is add code tothe sample player that will simply call up video_update_views.asp and pass the url of the video being played as "vpath"

there will be no return information back to the roku, just want to be able to update my videos in my database on my website.. figured this should be easy, but I'm missing something very simple.. (probably cause I've been working on this all night (31 hours straight without sleep)..
http://www.TVByDemand.com
0 Kudos
5 REPLIES 5
RobSMS
Visitor

Re: Simple http missing something...

Get some sleep! lol

Try setting up your url before passing it to the .SetUrl and use a "+" instead of a "&"


url = http://www.tvbydemand.com/video_update_views.asp?vpath=" + episode.url
request.SetUrl(url)


You may also need to encode your episode.url depending on the characters contained within.
Need Apps Templates? Content Management for OTT/IPTV? Check me out @ http://rovidx.com
0 Kudos
belltown
Roku Guru

Re: Simple http missing something...

"mitchstein" wrote:
request.SetMessagePort(port)
request.SetUrl("http://www.tvbydemand.com/video_update_views.asp?vpath=" & episode.url) (the error appears to be at the &)

what I'm trying to do is add code tothe sample player that will simply call up video_update_views.asp and pass the url of the video being played as "vpath"

there will be no return information back to the roku, just want to be able to update my videos in my database on my website.. figured this should be easy, but I'm missing something very simple.. (probably cause I've been working on this all night (31 hours straight without sleep)..

This might work ('+' is the BrightScript string concatenation operator):
request.SetUrl("http://www.tvbydemand.com/video_update_views.asp?vpath=" + episode.url)

Although you might need to url-escape the query string, in which case try:
request.SetUrl("http://www.tvbydemand.com/video_update_views.asp?vpath=" + request.Escape(episode.url))


EDIT: Looks like Rob beat me to it.
0 Kudos
mitchstein
Roku Guru

Re: Simple http missing something...

yep that should be it!! I was coding all day in asp using thisstring & thatstring... forgot in brightscript uses + instead of &.. duh.. and the escape is probably neccessary will let you know how I made out as soon as I get a chance to try it.. tonite though, sleep, just spent another 10 hours working on new asp code, lol.. thanx for the quick response though..
http://www.TVByDemand.com
0 Kudos
mitchstein
Roku Guru

Re: Simple http missing something...

do I need to anything else in brisghtscript to execute the url, I do not need any displays (do not want it to display anything) just want to the vpath value to the asp page... like does it need a close statement or execute statement?
http://www.TVByDemand.com
0 Kudos
belltown
Roku Guru

Re: Simple http missing something...

If you don't care about headers and response codes, then just call request.GetToString() after the call to SetUrl().
0 Kudos