title: How to make request with Node http module
body: <p>How do I make get request to <a href="https://api.urbandictionary.com/v0/define?term=wat" rel="nofollow noreferrer">https://api.urbandictionary.com/v0/define?term=wat</a> using http.request?
  When running this code, I'm getting no response before closing:</p>
  <pre><code>import { request, METHODS } from 'http';
  
    const options = {
      host: 'api.urbandictionary.com',
      path: '/v0/define/?term=wat',
      pathname: '/v0/define/',
      search: 'term=wat',
      method: 'GET',
      headers: { Accept: 'application/json' }
    }
  
    const req = request(options, (res) =&gt; {
      let resAccum = '';
      res.on('data', (chunk) =&gt; {
        console.log('GOT chunk', chunk);
        resAccum += chunk;
      });
      res.on('close', () =&gt; console.log('FINISHED', resAccum)); // FINISHED
      res.on('error', err =&gt; console.log(err));
    });
  
    req.on('error', err =&gt; console.log(err));
    req.end();
  </code></pre>