To improve performance and reduce bandwidth usage, the Pexip Engage API supports HTTP response compression.
How it works
When your client includes an Accept-Encoding header specifying one or more supported compression algorithms, the server will automatically compress the response using a matching algorithm. The response will then include a Content-Encoding header indicating which algorithm was applied.
If no preference is specified (*), the server will default to gzip.
Example request
GET /appointments HTTP/1.1
Host: api.pexipengage.com
Accept-Encoding: br, gzip
Example response
HTTP/1.1 200 OK
Content-Encoding: br
Content-Type: application/json
...
Supported algorithms
The API currently supports the following compression methods:
br– Brotli compressiongzip– Gzip compression*– No specific preference (defaults to gzip)
Note: The list of supported compression algorithms may be extended or changed in the future.
Best practices
- Compression is automatically applied by the server if the
Accept-Encodingheader is supplied; no additional configuration is required. - Be aware that compression can increase CPU usage on both client and server sides.
- For very small payloads, compression may not provide a significant benefit.