for _ in {1..6}; do
curl -sv $PROXY_IP/echo \
-H "apikey:example-key" 2>&1 | grep -E "(Status|< HTTP)"
echo
done
The first request results in X-Cache-Status: Miss. This means that the request is sent to the upstream service. The next four responses return X-Cache-Status: Hit which indicates that the request was served from a cache. If you receive an HTTP 429 from the first request, wait 60 seconds for the rate limit timer to reset.
< HTTP/1.1 200 OK
< X-Cache-Status: Miss
< HTTP/1.1 200 OK
< X-Cache-Status: Hit
< HTTP/1.1 200 OK
< X-Cache-Status: Hit
< HTTP/1.1 200 OK
< X-Cache-Status: Hit
< HTTP/1.1 200 OK
< X-Cache-Status: Hit
< HTTP/1.1 429 Too Many Requests