Hello, new developer here.
GetResponseCode returns 401, but GetResponseHeaders returns nothing. I know that my server is sending back response headers. I’ve also seen this with code 403. Codes 200 and 500 work as expected (I get headers). Any ideas?
Thanks in advance.
Can you try GetResponseHeadersArray() and report the results?
–Kevin
Thanks for your reply.
Same results with GetResponseHeadersArray() - 0 elements in the array.
According to the online SDK doc at http://sdkdocs.roku.com/display/sdkdoc/roUrlEvent, “…All headers are returned regardless of the status code”. I am getting zero headers from GetResponseHeadersArray() when response code is 40x on my Roku 3 with firmware version 5.0 build 8045. This function only works when response code is 200. So, it looks like Roku has never fixed the GetResponseHeadersArray() bug since 2010?
Cool! RetainBodyOnError() did the trick, thanks.