chansen / p5-http-tiny

Tiny HTTP Client
https://metacpan.org/dist/HTTP-Tiny
53 stars 52 forks source link

RFE: Move header parsing into separate module #140

Closed FGasper closed 4 years ago

FGasper commented 4 years ago

There are pieces in HTTP::Tiny that are independently useful. The one I have in mind presently is the HTTP response header parsing, which I’d like to reuse in a non-blocking HTTP client I’m building on top of Net::Curl.

@chansen @xdg are you opposed in principle to splitting that part of HTTP::Tiny into a separate module? I’m happy to submit a PR if so. By virtue of HTTP::Tiny’s being in core this would effectively add a standard, lightweight HTTP header parser interface to Perl, which would seem a win for the community as a whole.

Thank you for your consideration!

karenetheridge commented 4 years ago

Would it be sufficient to expose that functionality in its own function in HTTP::Tiny?

xdg commented 4 years ago

I would prefer not to have an additional module. But you're welcome to copy it -- it's like 40 lines of code.