You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is quite an unusual scenario so this may not be the best way to resolve it, but it was one of my first ideas so I thought it was worth raising.
Scenario: We're working with an API that allows us to make 60 requests over a 60 second period. Additionally, the API returns to us (via an HTTP header) how many requests we have left, although it does not inform us when the number will be increasing. That's nice and straightforward so far. Where it gets interesting is that for the first 30 minutes of a new authorisation (new customer being onboarded) there are no limits. During this period, the HTTP header will always return 60.
Problem: We don't know at the time of making the first request (without some serious re-engineering) whether the connection is within this 30 minute window or not
Proposed Solution: If there was a method that would enable us to Pop the oldest item off the TimeStamps collection then when we got the response back, we could look at our remaining requests and if it's 60 then we could then tell the TimeLimiter to not remember that value (so it won't enforce a delay later on)
If you're happy with this kind of method being added then I'm happy to work on the implementation
The text was updated successfully, but these errors were encountered:
This is quite an unusual scenario so this may not be the best way to resolve it, but it was one of my first ideas so I thought it was worth raising.
Scenario: We're working with an API that allows us to make 60 requests over a 60 second period. Additionally, the API returns to us (via an HTTP header) how many requests we have left, although it does not inform us when the number will be increasing. That's nice and straightforward so far. Where it gets interesting is that for the first 30 minutes of a new authorisation (new customer being onboarded) there are no limits. During this period, the HTTP header will always return 60.
Problem: We don't know at the time of making the first request (without some serious re-engineering) whether the connection is within this 30 minute window or not
Proposed Solution: If there was a method that would enable us to
Pop
the oldest item off theTimeStamps
collection then when we got the response back, we could look at our remaining requests and if it's 60 then we could then tell the TimeLimiter to not remember that value (so it won't enforce a delay later on)If you're happy with this kind of method being added then I'm happy to work on the implementation
The text was updated successfully, but these errors were encountered: