diff --git a/README.md b/README.md index 212cf89..5599976 100644 --- a/README.md +++ b/README.md @@ -242,15 +242,15 @@ output of `reply` returns... Pulls down file (available as a buffer) with its metadata. - client.get("foo/hello.txt", function(status, reply, metadata){ - console.log(reply.toString(), metadata) + client.get("foo/hello.txt", function(status, reply, headers){ + console.log(reply.toString(), headers['x-dropbox-metadata']); }) output of `reply.toString()` returns... here is some text -output of `metadata` returns... +output of `headers['x-dropbox-metadata']` returns... { "revision": 11, diff --git a/lib/dbox.js b/lib/dbox.js index d39a258..5cddd7a 100644 --- a/lib/dbox.js +++ b/lib/dbox.js @@ -141,8 +141,7 @@ exports.app = function(config){ if (e) { cb(null, null, null); } else { - var headers = (r.headers['x-dropbox-metadata'] !== undefined) ? helpers.parseJSON(r.headers['x-dropbox-metadata']) : {}; - cb(r.statusCode, b, headers); + cb(r.statusCode, b, r.headers); } }) },