Skip to content

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

Open

Description

@creinig

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?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions