All Products
Search
Document Center

:Does API Gateway support gzip compression and do I need to add the Accept-Encoding request header?

Last Updated:Jun 14, 2023

Yes. A response is compressed when the following three conditions are all met:

  • The request carries the Accept-Encoding header, and the value of this field contains gzip.

  • The response body is greater than 2 KB in size.

  • The contenttype value in the response body is text/xml text/plain text/css application/javascript application/x-javascript application/rss + xml application/xml application/json application/octet-stream.