Closed jpallen closed 11 years ago
Indeed this is a bug. Thanks for reporting it. A patch would be welcomed.
Ok, I'll have a look into it further. I don't think there needs to be a global options
variable at all. As far as I can tell the Dropbox API has no options which can be used on all API calls. So I think this should be done away with completely. Do you agree?
I was bitten by this issue as well. For instance if I send a cursor to client.delta
, then every API request gets cursor as a parameter and dropbox replies with errors.
Is there a good reason for appending the
args
into the globaloptions
variable? This means that if I pass an argument like{ parent_rev : 'foo' }
to aput
request it gets injected intooptions
variable. It is then always sent on subsequent requests, and this throws an error from the API since calls likeget
don't understandparent_rev
.If this is an accident rather than by design then I will put together a patch that stops this happening and makes each
args
local to its own request.Regards, James