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

[REQ][typescript] Enable header override at request time #18846

Open
davidgamero opened this issue Jun 3, 2024 · 0 comments
Open

[REQ][typescript] Enable header override at request time #18846

davidgamero opened this issue Jun 3, 2024 · 0 comments

Comments

@davidgamero
Copy link
Contributor

Is your feature request related to a problem? Please describe.

When making requests, the current options only allow passing in a full Configuration, but for cases like supplying a Content-Type for a JSON Merges it would be much easier to allow passing an additional header when making a request

Describe the solution you'd like

Adding an additional input, or overloading the optional _options?: Configuration parameter for generated operations

Alternatively, allow supplying custom middleware at request time, which would provide a more potentially more flexible solution, and allow the existing middleware implementation to handle the header override

Describe alternatives you've considered

The current approach has been to re-created a fully new Configuration from an existing one each time we want to change a header, and then supply the header addition as a middleware.
We could continue to modify the entire configuration per-request, continuing to rely on internals instead of using a dedicated per-request mechanism

Additional context

Thread from kubernetes-client/javascript discussion: kubernetes-client/javascript#754 (comment)

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

No branches or pull requests

1 participant