christianhelle / httpgenerator

Generate .http files from OpenAPI (Swagger) specifications
MIT License
86 stars 6 forks source link

Custom header for generated requests #148

Closed Caychu closed 4 weeks ago

Caychu commented 1 month ago

Is your feature request related to a problem? Please describe. I want to create Requests with a special header that is not described inside of the openapi.yml. This is needed for some services that require this header

Describe the solution you'd like I want to create Requests with a special header that is not described inside of the openapi.yml

Describe alternatives you've considered Solution would be an option like where I can add a list of custom headers

christianhelle commented 1 month ago

@Caychu Thanks for taking the time to make this suggestion.

Are you thinking of something like --custom-header "X-Custom-Header: Some Value"

Caychu commented 1 month ago

@christianhelle yes exactly. Maybe there is a way to provide more then one header. I only need one custom header for my use case.

Thank you for the fast reply

christianhelle commented 1 month ago

@Caychu We could allow multiple instances of the argument, like this

--custom-header "X-Custom-Header-1: Some Value" --custom-header "X-Custom-Header-2: Some Value"
Caychu commented 4 weeks ago

Sounds perfect

christianhelle commented 4 weeks ago

@Caychu This is trivial to implement and I'll get started on this tonight