'HTTP::Tiny' => {
'MAINTAINER' => 'dagolden',
- 'DISTRIBUTION' => 'DAGOLDEN/HTTP-Tiny-0.021.tar.gz',
+ 'DISTRIBUTION' => 'DAGOLDEN/HTTP-Tiny-0.022.tar.gz',
'FILES' => q[cpan/HTTP-Tiny],
'EXCLUDED' => [
't/00-report-prereqs.t',
't/200_live.t',
+ 't/200_live_local_ip.t',
't/210_live_ssl.t',
qr/^eg/,
qr/^xt/
use strict;
use warnings;
# ABSTRACT: A small, simple, correct HTTP/1.1 client
-our $VERSION = '0.021'; # VERSION
+our $VERSION = '0.022'; # VERSION
use Carp ();
my @attributes;
BEGIN {
- @attributes = qw(agent default_headers max_redirect max_size proxy timeout SSL_options verify_SSL);
+ @attributes = qw(agent default_headers local_address max_redirect max_size proxy timeout SSL_options verify_SSL);
no strict 'refs';
for my $accessor ( @attributes ) {
*{$accessor} = sub {
};
my $handle = HTTP::Tiny::Handle->new(
- timeout => $self->{timeout},
- SSL_options => $self->{SSL_options},
- verify_SSL => $self->{verify_SSL},
+ timeout => $self->{timeout},
+ SSL_options => $self->{SSL_options},
+ verify_SSL => $self->{verify_SSL},
+ local_address => $self->{local_address},
);
if ($self->{proxy}) {
elsif ( $scheme ne 'http' ) {
die(qq/Unsupported URL scheme '$scheme'\n/);
}
-
$self->{fh} = 'IO::Socket::INET'->new(
PeerHost => $host,
PeerPort => $port,
+ $self->{local_address} ?
+ ( LocalAddr => $self->{local_address} ) : (),
Proto => 'tcp',
Type => SOCK_STREAM,
Timeout => $self->{timeout}
=head1 VERSION
-version 0.021
+version 0.022
=head1 SYNOPSIS
=item *
+C<local_address>
+
+The local IP address to bind to
+
+=item *
+
C<max_redirect>
Maximum number of redirects allowed (defaults to 5)
=for Pod::Coverage agent
default_headers
+local_address
max_redirect
max_size
proxy
There is no support for a Request-URI of '*' for the 'OPTIONS' request.
+=item *
+
+There is no support for IPv6 of any kind.
+
=back
=head1 SEE ALSO