From adf5179fcfd893c828f9a9c475b38d41f8171495 Mon Sep 17 00:00:00 2001 From: Silvano Luciani Date: Wed, 23 Jul 2014 11:28:51 -0700 Subject: [PATCH] Pass to request an empty object instead of true This is needed for request to set the content-type header to application/json --- lib/datastore/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/datastore/index.js b/lib/datastore/index.js index 5122faf73f2..94a3f01b1aa 100644 --- a/lib/datastore/index.js +++ b/lib/datastore/index.js @@ -295,7 +295,7 @@ Transaction.prototype.mapQuery = function(q, mapperFn, opt_callback) { Transaction.prototype.makeReq = function(method, req, callback) { // TODO(jbd): Switch to protobuf API. // Always pass a value for json to automagically get headers/response parsing. - req = req || true; + req = req || {}; this.conn.req({ method: 'POST', uri: DATASTORE_BASE_URL + '/' + this.datasetId + '/' + method,