You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe the second parameter was originally meant to retrieve only a subset of all request headers, similar to the useRequestHeaders of Nuxt. However, that documented signature does not match the signature of the function implementation itself.
I believe that the original intent was good, and getRequestHeaders should accept a second parameter to pick whatever headers we want to retrieve. In brief, the following code should work as expected:
pi0
changed the title
getRequestHeaders (and getHeaders) does not accept a second parameter as documented in the README
Support header filtering for getRequestHeadersJan 16, 2024
Environment
Reproduction
Describe the bug
When reading the README, the signature of
getRequestHeaders
looks like this:I believe the second parameter was originally meant to retrieve only a subset of all request headers, similar to the
useRequestHeaders
of Nuxt. However, that documented signature does not match the signature of the function implementation itself.I believe that the original intent was good, and
getRequestHeaders
should accept a second parameter to pick whatever headers we want to retrieve. In brief, the following code should work as expected:Additional context
I'm open to creating a fix though.
Logs
No response
The text was updated successfully, but these errors were encountered: