Skip to content

[html2] produces/consumes headers missing from curl example #4481

@bshamblen

Description

@bshamblen

The necessary headers are not included in the curl example if the either the consumes or produces option is set, either globally or for the specific path.

For example, a POST endpoint that expects a JSON body and returns a JSON response should look like this:

curl -X POST -H "api-key: [[apiKey]]" -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Basic [[basicHash]]" "https://www.example.com/v1/some-action"

... but it currently looks like this:

curl -X POST -H "api-key: [[apiKey]]" -H "Authorization: Basic [[basicHash]]" "https://www.example.com/v1/some-action"

I already have a fix ready to submit, but want to make sure you agree with this before I submit the PR.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions