Skip to content

Commit 8654668

Browse files
committed
xhr doesn't support qs.
1 parent 90646ec commit 8654668

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/connection.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
var noop = require('./util/noop'),
55
extend = require('extend'),
6+
querystring = require('querystring'),
67
request = require('request'),
78
ArangoError = require('./error'),
89
jsonMime = /\/(json|javascript)(\W|$)/;
@@ -43,13 +44,13 @@ extend(Connection.prototype, {
4344
url = url.replace(/\/[^\/]+\/..\//, '/');
4445
if (oldUrl === url) break;
4546
}
47+
if (opts.qs) url += '?' + (typeof opts.qs === 'string' ? opts.qs : querystring.stringify(opts.qs));
4648

4749
request({
4850
url: url,
4951
auth: opts.auth || this.config.auth,
5052
headers: extend(headers, this.config.headers, opts.headers),
5153
method: (opts.method || 'get').toUpperCase(),
52-
qs: opts.qs,
5354
body: body,
5455
encoding: 'utf-8'
5556
}, function (err, response, rawBody) {

0 commit comments

Comments
 (0)