network.request redirect

I’m trying to use network.request with “GET” to access a shared file on Dropbox from inside my app. According to Dropbox this will work after a redirect. According to your documentation network.request handles redirects for me but it doesn’t seem to handle this one. I’m hoping you can give me some insight into why it isn’t handling the redirect which will help me solve the problem.

When I do the request, instead of getting the file data I get this passed to my return function:

\<html\> &nbsp; &nbsp;\<head\>\<title\>Found\</title\>\</head\> &nbsp; &nbsp;\<body\> &nbsp; &nbsp; &nbsp;\<h1\>Found\</h1\> &nbsp; &nbsp; &nbsp;\<p\>The resource was found at \<a href="https://dl.dropboxusercontent.com/content\_link/blahblahblah?dl=1"\>https://dl.dropboxusercontent.com/content\_link/blahblahblah?dl=1\</a\>; &nbsp; you should be redirected automatically. &nbsp; &nbsp; &nbsp; \<!-- &nbsp;--\>\</p\> &nbsp; &nbsp; &nbsp;\<hr noshade\> &nbsp; &nbsp; &nbsp;\<div align="right"\>WSGI Server\</div\> &nbsp; &nbsp;\</body\> &nbsp; \</html\>

Ok, so, what I have learned is that the HTML above is part of an redirect and for whatever reason Corona SDK is not handling it. I have turned off error handling and will handle the error myself. However, you might want to look into this since network.request documentation claims it handles redirects.

Ok, so, what I have learned is that the HTML above is part of an redirect and for whatever reason Corona SDK is not handling it. I have turned off error handling and will handle the error myself. However, you might want to look into this since network.request documentation claims it handles redirects.