Skip to content

[Feature Request] Add ability to customize curl for "try" feature #1075

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

Open
creinig opened this issue Feb 5, 2025 · 0 comments
Open

[Feature Request] Add ability to customize curl for "try" feature #1075

creinig opened this issue Feb 5, 2025 · 0 comments

Comments

@creinig
Copy link

creinig commented Feb 5, 2025

Hi,

our API requires (or at least strongly encourages) the use of HTTP compression for all requests. This means that (a) all requests sent through the rapidoc "try" feature need to have an appropriate "Accept-Encoding" header set (possible via #addEventListener('before-try', ...)), and (2) the generated example curl command should have the "--compressed" flag.

I haven't found a way to influence the curl command generation. Would it be possible to add e.g. a additional-parameters-for-curl-on-try (list / map) option or maybe an event hook allowing to modify the generated command before it is shown?

Maybe also a convenience compress-try-requests (bool) option for this specific but relatively common use case?

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