We're making changes to the Community, so you may have received some notifications - thanks for your patience and welcome back. Learn more here.
Forum Discussion
tomglod
4 months agoExplorer | Level 3
Bad Request Errors Hints
So, I'm new to the dropbox API, and the work has been a giant pain. Mainly because of the design of the dropbox api and the unusual decisions that were made. I am writing this in hopes of saving so...
tomglod
Explorer | Level 3
That may be true, but you may also see a "expecting Content-Type" error, urging you to include a content-type.
Здравко
4 months agoLegendary | Level 20
tomglod wrote:That may be true, ...
Hi tomglod,
It is definitely true! As Greg mentioned, meaning of content depends on content type. Empty string is definitely not valid JSON content type!!! Passing empty string as JSON is... a bug. To represent nothing, correct representation is null (by the way this is not a string - string "null" would be wrong too). Keep in mind that quotes that appear on command line (untagged) get stripped by the shell.
You can pass arguments as nothing when missing both content-type and the body as already discussed.
tomglod wrote:..., but you may also see a "expecting Content-Type" error, urging you to include a content-type.
Dropbox API cannot be "urging you to include content type"! If you have included inappropriate content type, error response will show you possible correct variants while suppose you want to pass something. Here the message is missing the option of missing content type - something that may be improved. If something else urge you though, try figure out where it comes from - it may be from your environment.
Good luck.
About Discuss Dropbox Developer & API
795 PostsLatest Activity: 3 days ago
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 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!