How to use superagent to pass a query with multiple values

            Superagent is a light and progressive ajax API that has flexibility and readability. If you have a URL which has two or more parameters you can pass the same query with all those values to using super agent. If your URL looks like this:

website.com/?q=help&q=moreHelp&q=evenMoreHelp

Normally in JavaScript object are passed like this:

 $ node

> {q:'help',q:'moreHelp',q:'evenMoreHelp'}

{ q: 'evenMoreHelp' }

In super agents values are passed as query strings as given below:

request

  .get('/querystring')

  .query('search=Manny&range=1..5')

  .end(function(res){

 

  });

You can pass the string as :

req.get('website.com').query('q=help&q=moreHelp&q=evenMoreHelp').end(...)

or

req.get('website.com')

 .query({ q: 'help' })

 .query({ q:'moreHelp' })

 .query({ q:'evenMoreHelp' })

.end(...);