title: How to compress HTTP response?
body: <p>I have a HTTP response request that is too big and slow (1.2 mb, 15 seconds, plain text). I want to compress using gzip but the server is not mine. Then I use the data for a <a href="https://www.chartjs.org/" rel="nofollow noreferrer">chart</a></p>
  <p>For example. I need this response to be compress:</p>
  <p><a href="https://rickandmortyapi.com/api/location/20" rel="nofollow noreferrer">https://rickandmortyapi.com/api/location/20</a></p>
  <p>Is it possible?</p>
  <p>I use this code that works great:</p>
  <pre><code>$.post(&quot;http://serverNotMine&quot;, function() {}, &quot;text&quot;)
      .done(function(data) {
          // my code for a chart.js
      })
      .fail(function() {
          alert(&quot;Error&quot;);
      });
  </code></pre>
  <p>How can I know if the server accepts gzip?</p>