You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
dethier1958
3 years agoExplorer | Level 3
Error -1017 "cannot parse response"
I am getting an error code -1017 "cannot parse request" from my app when it tries to download a file from Dropbox. This code has not changed for a while and has worked without trouble. I use the same...
dethier1958
3 years agoExplorer | Level 3
I suspect the issue may be that iOS does not like a POST request that does not send any data. The Dropbox /download command is supposed to be POST, but there is no body. The only thing I've done that works consistently is to do a GET instead of a POST. Dropbox still sends the data, and iOS is happy too.
Will I run into any problems if I continue using GET instead of POST with the /download command?
- Greg-DB3 years agoDropbox Staff
Thanks for the report! We'll look into it, but we could use a few more pieces of information:
- Can you confirm that you are not using an official Dropbox SDK (such as the official Dropbox Objective-C or Swift SDK)? In that case, what network client are you using?
- Can you share the relevant code snippet(s) for reproducing this issue? (Please make sure to redact any access/refresh token.)
- Can you share the full error/output you're getting?
In any case, it sounds like you're referring to the /2/files/download endpoint in particular. That endpoint officially supports both GET and POST requests, so either should be fine. (And continuing to use GET for now is fine, but POST is the standard method for it.) Requests to /2/files/download don't have a request body (since the options are sent in the "Dropbox-API-Arg" request header), and so there's no "Content-Type" request header expected, as there's no request body content to describe.
- dethier19583 years agoExplorer | Level 3
I'm pretty sure this is a problem with Apple's iOS SDK and how they handle POST requests with no content. I think the error was triggered before anything was even sent to your servers. I am planning on further playing with this to see if I can narrow things down more. I may continue using GET for now since that has worked perfectly for me.
If I did a POST and sent some dummy content (to make iOS happy) would Dropbox simply ignore it, since it was not expected? I may try sending an empty JSON or some dummy JSON and see if that works.
Please do notify developers though if you will no longer support GET for the download endpoint. I'd prefer to have a little warning to try to find a solution if needed.
- Greg-DB3 years agoDropbox Staff
Thanks for following up. Please do let us know if you find anything else.
Unfortunately since that endpoint does not expect anything in the request body, I believe attempting to send any such dummy data would cause the call to fail validation.
And yes, in any case that we need to intentionally make a breaking change, such as hypothetically ending support GET on these types of requests, we would send advanced notice by email.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,915 PostsLatest Activity: 2 days agoIf you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!