gorilla / mux

Package gorilla/mux is a powerful HTTP router and URL matcher for building Go web servers with 🦍
https://gorilla.github.io
BSD 3-Clause "New" or "Revised" License
20.92k stars 1.85k forks source link

[FEATURE] Accidental omission of GetHeaders? #743

Open amills-vibeirl opened 12 months ago

amills-vibeirl commented 12 months ago

Is there an existing feature request for this?

Is your feature request related to a problem? Please describe.

Check this out:

Screen Shot 2023-11-30 at 8 52 07 PM





We can GetQueries, GetName, GetMethods, but we cannot GetHeaders ?

I am trying to registerRoutes so that can create API documentation that's faithful and automatic.

it's also very unclear what "GetVarNames()" does

Describe the solution that you would like.

I am looking for a method on Route that returns the registered acceptable Headers for the router to match the request to the handler

Describe alternatives you have considered.

No response

Anything else?

No response

amills-vibeirl commented 12 months ago

If we do a fix for this, let's keep in mind this related issue: https://github.com/gorilla/mux/issues/744