0

I am trying to call an API in ROKU player using bright script. But I a getting "response code -3". But when I am hitting that service on Web Browser it gives the xml in response. Actually there is a redirection in the API which I am using. As I know the redirection is not handled by the ROKU OS level. So How will I come out this situation. Please help me and provide me any solution for that how can I handle the redirection in ROKU?

Thanks in advance.

Rachit Gaur
  • 91
  • 1
  • 3

3 Answers3

3

The documentation at http://sdkdocs.roku.com/display/sdkdoc/roUrlEvent gives CURLE_URL_MALFORMAT as name for the -3 code you got from GetResponseCode() on the roUrlEvent. Try checking the string you get from GetFailureReason() on that same roUrlEvent, which should give a more detailed description of the problem.

Pieter Siekerman
  • 461
  • 3
  • 14
0

Please check if you are missing any header in http request. Check for accept header also.

Abhishek
  • 3,304
  • 4
  • 30
  • 44
-2

Check this link how to make Get and Post request in Roku.

request = CreateObject("roUrlTransfer")
request.SetUrl("http://blog.roku.com/developer")
html = request.GetToString()
Ashish Mishra
  • 167
  • 2
  • 10