Closed amplexdenmark closed 1 month ago
This will mess with the logic that ensures we don't have duplicate keys, such as here: https://github.com/elixir-mint/mint/blob/50b11d668b6a240b0d9b20c67fbb41a10a7410b1/lib/mint/core/headers.ex#L94.
I think the right approach instead is to fix where mint is called by openapi-generator-cli (or tesla?).
Agreed, we don't need to support atom headers. More importantly, to support them would make Mint less efficient since it would need to check for both string and atom header keys in a few places. With Mint being intended for low-level use cases, the right approach here is to fix this upstream as @ericmj mentioned. Thanks anyway @amplexdenmark 💟
I have the issue that elixir code produced using openapi-generator-cli uses atoms for header keys. I propose this change to handle that.