diff --git a/lib/http-invocation.js b/lib/http-invocation.js index 0839dcfd..c9125fc2 100644 --- a/lib/http-invocation.js +++ b/lib/http-invocation.js @@ -146,7 +146,12 @@ HttpInvocation.prototype._processArg = function(req, verb, query, accept) { // default to query string for GET if (val !== undefined) { query = query || {}; - query[name] = val; + if ((accept.type === 'object' || accept.type === 'string') && + typeof val === 'object') { + query[name] = JSON.stringify(val); + } else { + query[name] = val; + } } } else { // default to storing args on the body for !GET