Documentation: What case do the keys in `request.headers` use?
See original GitHub issueThe API docs page mentions that headers
is a dictionary of headers but does not describe the format of the keys. Are they just as the caller specified them, or are they standardised to a particular case (such as first capital, rest lower case)? Thanks!
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
The Key HTTP Response Header Field
The 'Key' header field for HTTP responses allows an origin server to describe the secondary cache key (RFC 7234, Section 4.1) for a...
Read more >API Headers - What Are They? Examples & More [Explained]
API headers represent the meta-data associated with an API request and response. In other words, they're like an extra source of information for...
Read more >HTTP headers - GeeksforGeeks
All the headers are case-insensitive, headers fields are separated by colon, key-value pairs in clear-text string format.
Read more >HTTP/1.1: Header Field Definitions
Accept headers can be used to indicate that the request is specifically limited to a small set of desired types, as in the...
Read more >HTTP/1.1 Header Casing - Envoy Proxy
When handling HTTP/1.1, Envoy will normalize the header keys to be all lowercase. While this is compliant with the HTTP/1.1 spec, in practice...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve done some more testing, and the headers are definitely preserved (so my earlier comment on lowercasing is wrong). I’ve implemented a change that adds another field
.normalizedHeaders
, with header names lowercased.The field is available to APIs deployed with claudia 1.6.0 (so api builder version is not that important). Here are the release notes: https://claudiajs.com/news/2016/08/02/claudia-1.6.0.html
Thank you! This is really useful when one needs to work with the headers.