title: How can I add query parameters to a node.js/express.js res.redirect function?
body: <p>I am trying to use redirect users to a Google Authorization page in my app.  For my situation, I can't use any Google API modules.  </p>
  
  <p>I know I can format my <code>res.redirect()</code> function as such:</p>
  
  <pre><code>res.redirect('https://accounts.google.com/o/oauth2/auth?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcalendar.readonly&amp;response_type=code&amp;redirect_uri=https%3A%2F%2Flocalhost%3A3000%2Fauth&amp;client_id=690512789525-g8dbv0s1jo80u5hvevptqapeqokq7ees.apps.googleusercontent.com&amp;hl=en&amp;from_login=1&amp;as=-6cc9a02870d13e22&amp;authuser=0')
  </code></pre>
  
  <p>But I would prefer something cleaner, where I could keep my query parameters in an object. Something like:</p>
  
  <pre><code>res.redirect({
    uri: 'https://accounts.google.com/o/oauth2/auth,
    scope: 'https://............etc',
    response_type: 'code',
    [...etc...]
  })
  </code></pre>
  
  <p>With each of my query params as an attribute-value pair in my object.  </p>
  
  <p>Any ideas on how to do that?</p>