Skip to content

Instantly share code, notes, and snippets.

@lawrencejones
Created February 6, 2020 17:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lawrencejones/eed4c2fa4a9a462a0024ae7804848c44 to your computer and use it in GitHub Desktop.
Save lawrencejones/eed4c2fa4a9a462a0024ae7804848c44 to your computer and use it in GitHub Desktop.
GoCardless response header changes, from 14th February onward

(a) Request without downcasing opt-in

This is what we'll be serving until February 14th, after which we'll switch to the downcased version by default.

$ curl -v --http1.1 \
    -H "authorization: Bearer $TOKEN" \
    -H 'gocardless-version: 2015-07-06' \
    -H 'content-type: application/json' \
    https://api.gocardless.com/customers 2>&1 \
  | grep -i ratelimit

< RateLimit-Limit: 1000
< RateLimit-Remaining: 1000
< RateLimit-Reset: Thu, 06 Feb 2020 17:57:00 GMT

(b) Request with downcasing opt-in

This is the style of response you can expect after February the 14th, or if you opt-in before that date using the x-goog-downcase-all-headers: test header.

$ curl -v --http1.1 \
    -H "authorization: Bearer $TOKEN" \
    -H 'gocardless-version: 2015-07-06' \
    -H 'content-type: application/json' \
    -H 'x-goog-downcase-all-headers: test' \
    https://api.gocardless.com/customers 2>&1 \
  | grep -i ratelimit

< ratelimit-limit: 1000
< ratelimit-remaining: 1000
< ratelimit-reset: Thu, 06 Feb 2020 17:58:00 GMT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment