bunq / sdk_java

Java SDK for bunq API
MIT License
47 stars 23 forks source link

Add middleware/handler to throttle requests to conform to API rate limit #72

Open OGKevin opened 6 years ago

OGKevin commented 6 years ago

Steps to reproduce:

  1. Trigger a 429 response

What should happen:

  1. You the SDK retries after a few seconds

What happens:

  1. The user has to do this him/her self

Traceback

SDK version and environment

Response id

Extra info:

tubbynl commented 6 years ago

i think it makes more sense to abstract the http(client) handling so that users can inject/replace it with their own handling.

ApiClient mostly fulfills that responsibility already so it makes sense to use that as base