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.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Channel Surfer

Re: Problem with HTTP redirect 302 and HLS

Hi Joel,
Thanks for quick reply. I tried the method which you have suggested but no luck.
I am not able to get the header data means
h = msg.GetResponseHeaders()
Print h
this is returning blank.
As sdkdocs said:
GetResponseHeaders() as Object
Returns an roAssociativeArray containing all the headers returned by the server for appropriate protocols (such as HTTP).
Headers are only returned when the status code is greater than or equal to 200 and less than 300.

The response code which I am getting is "-3" and that's why I am not able to get the header data.

but when I am trying the API directly on browser its giving me the XML.
Is there any other way to work with this
0 Kudos
Binge Watcher

Re: Problem with HTTP redirect 302 and HLS

I wonder if ifURLTransfer.retainBodyOnError would help, and also, have you tried the GetResponseHeadersArray method of roUrlEvent?

- Joel
0 Kudos

Re: Problem with HTTP redirect 302 and HLS

-3 is not an http status code of course, since all status codes are positive 3-digit integers. If you're getting this -3 value from roUrlEvent.GetResponseCode, the doc ( says that that value means CURLE_URL_MALFORMAT. So it sounds like your URL is invalid.

Also, this doesn't have anything to do with the original topic (redirects and HLS), does it? And Roku does support redirects internally. I'm not sure if it did at the time the original post was posted, over 3 years ago, which demonstrates the reason it's not a good idea to post to very old threads.

0 Kudos