Good-day,
im busy trying to write a simple app to download files from dropbox.
im a newbie to mobile dev and asistance would be appricated.
im am receiving this error when downloading.
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", "application/octet-stream; charset=utf-8".
var aHttpClient = new HttpClient();
aHttpClient.DefaultRequestHeaders.Add("Content-Type", "application/octet-stream; charset=utf-8");
var aDorpboxConfig = new DropboxClientConfig("ApplicationName") { HttpClient = aHttpClient };
using (var dbx = new DropboxClient("Key_Here", aDorpboxConfig))
{
Dropbox.Api.Files.DownloadArg dargs = new Dropbox.Api.Files.DownloadArg(content.Path + "/" + content.Name) ;
using (var response = await dbx.Files.DownloadAsync(dargs))
{
var file = await response.GetContentAsStringAsync();
}
}