Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support per-request options #338

Open
taylor-sutton opened this issue Feb 16, 2021 · 1 comment
Open

Support per-request options #338

taylor-sutton opened this issue Feb 16, 2021 · 1 comment
Milestone

Comments

@taylor-sutton
Copy link
Contributor

Right now, there are various options exposed on the generated client such as timeout and retries. Sometimes it would be nice to set these options different for a single request. To do that now, it requires either creating a new client, or temporarily setting the options on the existing client (which doesn't play well if that client is shared across go-routines, for example).

Two example patterns of ways to implement this:

@taylor-sutton taylor-sutton added this to the v9.0 milestone Apr 21, 2022
@taylor-sutton
Copy link
Contributor Author

Another option in a somewhat orthogonal direction to adding it to the client methods is to support this customization on the server-side by adding fields to the swagger file, like x-wag-timeout. This probably works best in combination with the above, so that clients can maintain control: x-wag-timeout would change the default timeout of the generated client, but an actual user of the client can use the new client options to override.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant