title: Request.query undefined
body: <p>I'm trying to get the ean from this url: <a href="http://my_server.com/?ean=7038010034985" rel="nofollow noreferrer">http://my_server.com/?ean=7038010034985</a></p>
  
  <p>The NodeJS server handles the request like so:</p>
  
  <pre><code>const http = require('http')
  const port = 3000
  
  const requestHandler = async (request, response) =&gt; {
  
      let bar_code = request.query.ean
      bar_code = "7038010034985"
  
      let product = await Promise.race([
          get_info_meny_joker(bar_code, "meny.no"),
          get_info_meny_joker(bar_code, "joker.no"),
          get_info_openfoodfacts(bar_code)
      ])
  
      // WRITE TO DATABASE
      // database.ref('test/' + bar_code).set(product);
  
      response.setHeader('Content-Type', 'application/json');
  
      response.end(JSON.stringify(product))
  }
  
  const server = http.createServer(requestHandler)
  
  server.listen(port, (err) =&gt; {
    if (err) {
      return console.log('Error occurred', err)
    }
  
    console.log(`Server is listening on ${port}`)
  })
  </code></pre>
  
  <p>The application crashes (request.query.ean is undefined) as soon as it reaches "let bar_code = request.query.ean". I've googled around a bit, I just don't see what I'm doing different to the examples I've found. It worked just fine earlier when I was routing the request. Any ideas?</p>
  
  <p>Full error message underneath (line and character places might be off because of heavily cutting code to post here)</p>
  
  <pre><code>0|index    | TypeError: Cannot read property 'ean' of undefined
  0|index    |     at Server.requestHandler (/home/ubuntu/kalori_app/server/index.js:32:34)
  0|index    |     at emitTwo (events.js:126:13)
  0|index    |     at Server.emit (events.js:214:7)
  0|index    |     at Server.&lt;anonymous&gt; (/usr/local/lib/node_modules/pm2/node_modules/@pm2/io/build/main/metrics/httpMetrics.js:166:33)
  0|index    |     at parserOnIncoming (_http_server.js:619:12)
  0|index    |     at HTTPParser.parserOnHeadersComplete (_http_common.js:115:23)
  </code></pre>