Open WesleyAC opened 3 months ago
The client is cheap to clone so yes that is the intended strategy if you cannot use the exponential back off which handles the token for you per request. We are considering a new API for this in the impending rewrite (currently on the next branch) so that this is clearer since people (rightfully) get paranoid cloning things.
In the meantime time I will open a quick PR that explains this.
Is your feature request related to a problem? Please describe.
It's strange to me that the RequestStrategy is set on a per-client basis, rather than a per-request basis. If I'm interpreting this correctly, this means that the only way to make multiple idempotent requests with different keys is to create a new client for each request. Is this the correct way to use this library?
Describe the solution you'd like
A way to set the idempotency key per-request with the same client
Describe alternatives you've considered
Better documentation of this feature, in the case that creating a fresh client is low-cost and the correct way to do this.
Additional context
No response