title: How to avoid 504 when making an API call
body: <p>I am using the following code to create a request from my node application to call an API.</p>
  
  <pre><code>var options = {
        host: "www.something.com",
        path: "/api/something.php",
        method: "POST"
      };
  
  var request = https.request(options, callback);
  request.write(str);
  request.end();
  </code></pre>
  
  <p><br></p>
  
  <p><strong>Sometimes</strong> I am getting a response with Status Code - 504</p>
  
  <p>Will increasing the timeout of the app help?</p>
  
  <p>When I get a response with 504, does it mean the the gateways in between my client and the API server gave up?</p>
  
  <p>Or is the problem with my client?</p>