PHP code for Check Gzip Compression Example
This PHP code snippet was generated automatically for the Check Gzip Compression example.<< Back to the Check Gzip Compression example
What is Accept-Encoding?
The Accept-Encoding HTTP Request Header is an algorithm for comparing HTTP request headers. HTTP clients tell servers what encoding they support. In response, the server will respond in whichever encoding format is supported. The server uses content negotiation to select an offer and notifies the client with a Content-Encoding response header.
GZIP Compression Format Syntax
The following is an example of gzip compression in an HTTP response:
GZIP Compression Example
The following is an example GET request to the ReqBin echo URL:
Server response to our GET request with Content-Encoding HTTP header: