Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
HairyWombat
2 years agoHelpful | Level 6
Bad HTTP Content-Type header on download
I am converting, from Xamarin to MAUI, a working Android/iOS app that uses the .NET Dropbox API (specifically the Dropbox.Api V7.7.0 Nuget). Here is a segment of working Xamarin code: Dropbox...
Здравко
2 years agoLegendary | Level 20
HairyWombat wrote:...
Dropbox.Api.BadInputException: Error in call to API function “files/download”:
Bad HTTP “Content-Type” header: “application/x-www-form-urlencoded".
Expecting one of “text-plain”, “text-plain; charset =utf-8”, “application/octet-stream”, …..
...
Hi HairyWombat,
On different development platforms different underlying libraries may be in use for particular tasks processing implementation (including HTTP requests handling). There is no "replacing the native Android handler with the .NET one" - which is the dot net one? This is not mandatory one thing! 🙂
Usually most of the libraries use some default content type (when nothing explicitly set) and usually this is "application/x-www-form-urlencoded". Whenever this is inappropriate it should be changed to the correct one or wiped out. More stable solution is set new content type value whenever possible (it's usually possible). I don't know why .Net SDK of Dropbox tries to wipe it out for download tasks (that one you're using) - this may work, but is not so stable. You may try to set appropriate value like "application/octet-stream" (copy from here - like in upload tasks) and recompile the SDK. I haven't used and tested this in your environment, if I was in your shoes, this is the first thing I would try though - it's likely to work.
Good luck.
HairyWombat
2 years agoHelpful | Level 6
Thanks for that deep analysis, Здравко. I'll follow it up.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If 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, Facebook or Instagram.
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!