title: Perhaps Heroku does not send the request header
body: <p>There is the following script (<em>one-request.js</em>)</p>
  
  <pre><code>#!/usr/bin/env node
  var request = require('request');
  const cheerio = require('cheerio');
  
  var options = {
    url: 'https://www.accuweather.com/en/us/anchorage-ak/99501/daily-weather-forecast/346835?day=1', // Anchorage
    headers: {
      'User-Agent':'Web/2.0',
      'Connection':'keep-alive'
    }
  };
  function callback(error, response, body) {
    if (!error &amp;&amp; response.statusCode == 200) {
      var $ = cheerio.load(body);
      var title = $('div#header-logo &gt; a:first-child &gt; span').text();
      console.log('title:',title); // title: Anchorage Daily Weather
    }
  }
  request(options, callback);
  </code></pre>
  
  <p>It runs on the home computer (<em>node one-request.js</em>) and receives a successful response.</p>
  
  <p>However, when executing the script in Heroku (<em>heroku run one-request.js</em>) there is no answer. The same effect is obtained when running the script on the home computer, if the headers are removed in the request. Therefore, I assume that the problem is in the formation of headers in Heroku (also tested the version of <code>'User-Agent': 'Mozilla / 5.0 (X11; Ubuntu; Linux x86_64; rv: 59.0) Gecko / 20100101 Firefox / 59.0.</code> The same effect).</p>
  
  <p>If the requested address does not require headers (for other sites), the results of the script are equally successful for both the home and Heroku.</p>
  
  <p>How to make a request in the <strong>Heroku</strong>?</p>