title: Why does this http request time out?
body: <p>I am sending a GET request inside an OpenShift pod to a backend application. In the console of the openshift pod I can run the following command <strong>succesfully</strong>:</p>
  <pre><code>wget -qO- --no-check-certificate \
  --header 'Accept: */*' \
  --header 'Authorization: Basic &lt;base64 encoded auth&gt;' \
  https://my-url.nl:8221/path/to/my/resource/organisations
  </code></pre>
  <p>I can also call the API endpoint from postman without issue (from a different server).</p>
  <p>However, when I run the following fetch I get a timeout.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
  process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '0';
  
  const credentials = Buffer.from(
    `USERNAME:PASSWORD`
  ).toString('base64');
  
  fetch(
    'https://my-url.nl:8221/path/to/my/resource/organisations',
    {
      method: 'GET',
      headers: {
        Authorization: `Basic ${credentials}`,
        Accept: '*/*',
      },
    }
  ).then((data) =&gt; {
    console.log(data.json());
  }).catch((reason) =&gt; {
    console.log(reason);
  });</code></pre>
  </div>
  </div>
  </p>
  <p>I get the following error after a long wait</p>
  <pre><code>GET https://my-url.nl:8221/path/to/my/resource/organisations net::ERR_CONNECTION_TIMED_OUT
  Uncaught (in promise) TypeError: Failed to fetch
  </code></pre>
  <p>Both the preflight and actual API call fail.</p>
  <p>Am I forgetting something simple? Does this have to do with CORS? Or something with skipping the certificate validation? What kind of API call would return a timeout rather than a failed (400/500) response.</p>