rest icon indicating copy to clipboard operation
rest copied to clipboard

Add HasHeaderParameter option to set headers

Open akfaiz opened this issue 5 months ago • 0 comments

Is your feature request related to a problem?

Currently, the router provides convenient options to set request parameters:

  • HasPathParameter
  • HasQueryParameter

However, there is no built-in option for matching request headers, which is often needed for versioning, custom auth, or API feature toggles.

Describe the solution you’d like

Please add a new option, for example:

HasHeaderParameter(name string, p rest.HeaderParam) *Route

akfaiz avatar Jul 27 '25 14:07 akfaiz