title: Nodejs - HTTP - with optional parameter
body: <p>I need to make a http call within my node server .The optional parameter is:</p>
  
  <ul>
  <li>'name='      </li>
  </ul>
  
  <p>This means that url (relative path) should look like:</p>
  
  <pre><code>/v1/clans?name=**exampleValue**
  </code></pre>
  
  <p>So far the options for my http request looks like:</p>
  
  <pre><code>app.get('/v1/:clans?=:name', (req, res) =&gt; {
      console.log(req.path)
      const options = {
          host: 'api.clashofclans.com',
          path: req.path,
          method: 'GET',
          headers: {
              'Content-Type': 'application/json',
              Authorization: 'Bearer *token*'
          }
      };
      const x = https.get(options, (request) =&gt; {...});
  </code></pre>
  
  <p>But that doesnt work out. Does someone know how to include the optional parameters in my path property?</p>