RapiDoc icon indicating copy to clipboard operation
RapiDoc copied to clipboard

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

Open creinig opened this issue 8 months ago • 0 comments

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?

creinig avatar Feb 05 '25 11:02 creinig