function decompressResponsePolicy() {
    return {
        name: exports.decompressResponsePolicyName,
        async sendRequest(request, next) {
            // HEAD requests have no body
            if (request.method !== "HEAD") {
                request.headers.set("Accept-Encoding", "gzip,deflate");
            }
            return next(request);
        },
    };
}
A policy that retries according to three strategies:
- When the server sends a 429 response with a Retry-After header.
- When there are errors in the underlying transport layer (e.g. DNS lookup failures).
- Or otherwise if the outgoing request fails, it will retry with an exponentially increasing delay.