title: Request is not defined after installing request in nodejs
body: <p>I'm creating a script which is going to receive a data from API every 24 hours in specific time.
  I'm using <a href="https://www.npmjs.com/package/node-schedule" rel="nofollow noreferrer">node-schedule</a> package
  After I trying to see the script in terminal or in chrome console log. I receive an error that request is not defined.</p>
  
  <p>I installed RequireJS already, but the error still appears.
  I was trying the example from node-schedule documentation itself, also receiving the same error in terminal.
  Where is my mistake and how I can fix it?</p>
  
  <p>Code below:</p>
  
  <pre><code>var schedule = require("node-schedule");
  
  var j = schedule.scheduleJob("*/55 20 * * *", function() {
      request(
              "GET",
              "http://pro-api.coinmarketcap.com/v1/cryptocurrency/listings/latest?CMC_PRO_API_KEY=YOUR-API-KEY"
          )
          .then((r1) =&gt; {
              var x1 = JSON.parse(r1.target.responseText);
  
              var BTCdata = x1.data.find((d) =&gt; d.symbol === "BTC").quote.USD
                  .volume_24h; // creating a variable to store a BTC request from API
  
              console.log(BTCdata);
          })
          .catch((err) =&gt; {
              console.log(err);
          });
  });
  
  function request(method, url) {
      return new Promise(function(resolve, reject) {
          var xhr = new XMLHttpRequest();
          xhr.open(method, url);
          xhr.onload = resolve;
          xhr.onerror = reject;
          xhr.send();
      });
  }
  </code></pre>