chansen / p5-http-tiny

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

Options to force IPv4 or IPv6 #135

Closed rhansen closed 3 years ago

rhansen commented 4 years ago

IO::Socket::IP has a Family option that can be set to AF_INET or AF_INET6 to force A or AAAA lookups, and a Domain option that can be set to PF_INET or PF_INET6 to force the IP protocol. Please expose these options through the HTTP::Tiny constructor so that applications can force IPv4 or IPv6 connections.

tomhukins commented 4 years ago

Modules in the "Tiny" namespace should provide simple code that works for common use cases. Generally, it doesn't matter whether an HTTP request uses IPv4 or IPv6. I would encourage anyone interested in such customisation to use a more fully featured HTTP implementation instead.

xdg commented 3 years ago

I agree with Tom that this is outside the scope of HTTP::Tiny. Closing.