GET /v1/pm/* support gzip compression. Send
Accept-Encoding: gzip to opt in. Compression reduces the bytes transferred;
the decoded JSON fields and authentication requirements stay the same.
Browsers normally advertise gzip support automatically. Many HTTP libraries
also negotiate compression and decode responses for you.
Enable compression
These examples request the public sports-leagues endpoint, which needs no API key. Keep the usual authentication headers when calling authenticated endpoints.leagues array includes entries like this:
Handle both response formats
Allow both gzip and uncompressed responses. Compression applies to eligible200 OK JSON responses of at least 1 KiB. Small responses, errors, write
operations, health checks, range requests, and WebSocket upgrades remain
uncompressed. Responses marked Cache-Control: no-transform or carrying an
existing encoding or validator pass through unchanged.
Use your HTTP library’s automatic decompression. If you handle raw response
bytes yourself, decompress only when Content-Encoding is gzip.
With Go’s default transport, leave
Accept-Encoding unset to enable automatic
gzip negotiation and decompression. If you set that header yourself, you must
handle decompression yourself. Clients must continue accepting uncompressed
responses; do not require gzip with identity;q=0.gzip;q=0 also disables gzip. Clients that omit Accept-Encoding continue to
receive uncompressed responses. Request-body encoding and HMAC signing do not
change.