File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 33
44var noop = require ( './util/noop' ) ,
55 extend = require ( 'extend' ) ,
6+ querystring = require ( 'querystring' ) ,
67 request = require ( 'request' ) ,
78 ArangoError = require ( './error' ) ,
89 jsonMime = / \/ ( j s o n | j a v a s c r i p t ) ( \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 ) {
You can’t perform that action at this time.
0 commit comments