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
Grape consistently normalizes HTTP headers to PascalCase. This is ok since it's consistent.
However, there are more and more API clients which normalize HTTP headers to lowercase. One example is Axios.
This means that the exact same HTTP header name cannot be used as-is at the Grape API and Client side, since both implement a normalization of their own.
For example Rack provides Rack::Headers middleware which normalizes HTTP headers to lowercase per HTTP/2. It also seems the upcoming Rack 3 will provide lowercased HTTP headers by default.
I suggest an option to somehow enable HTTP header normalization to lowercase in Grape.
HTTP/2 defines that HTTP headers be lowercase.
Grape consistently normalizes HTTP headers to PascalCase. This is ok since it's consistent.
However, there are more and more API clients which normalize HTTP headers to lowercase. One example is Axios.
This means that the exact same HTTP header name cannot be used as-is at the Grape API and Client side, since both implement a normalization of their own.
For example Rack provides
Rack::Headers
middleware which normalizes HTTP headers to lowercase per HTTP/2. It also seems the upcoming Rack 3 will provide lowercased HTTP headers by default.I suggest an option to somehow enable HTTP header normalization to lowercase in Grape.
References:
The text was updated successfully, but these errors were encountered: