In my opinion it's a bit inconsistent to not allow the same format for a request as well. This allows the caller to either use an array (which will send multiple header entries) or a comma separate list of values which are both acceptable per the RFC. This also is a bit more generous with the data type of the header value so you can pass something like a number which will be coerced to a string. I'm fine removing the coercion too if you feel strongly otherwise I just know I've wanted to set things like x-retry-count (number), x-user-id (uuid), etc and would be nice if it "just worked".
Right now if you receive a response with multiple values for the same header, it comes back like so:
In my opinion it's a bit inconsistent to not allow the same format for a request as well. This allows the caller to either use an array (which will send multiple header entries) or a comma separate list of values which are both acceptable per the RFC. This also is a bit more generous with the data type of the header value so you can pass something like a number which will be coerced to a string. I'm fine removing the coercion too if you feel strongly otherwise I just know I've wanted to set things like x-retry-count (number), x-user-id (uuid), etc and would be nice if it "just worked".