dagolden / HTTP-Tiny-UA

Higher-level UA features for HTTP::Tiny
https://metacpan.org/author/DAGOLDEN
4 stars 8 forks source link

HTTP::Tiny::UA::Response `header` returning an arrayref or str is annoying #15

Open tobyink opened 7 years ago

tobyink commented 7 years ago

It would be nice to have a method which consistently returned a string. In the case of a header which was repeated in the response, join them with a comma. The HTTP spec says that the following two are equivalent:

X-Foo: 1
X-Foo: 2
X-Foo: 1, 2

I'm not suggesting changing the current header method, but adding a new one.

xdg commented 7 years ago

header_as_string or something, sure!