return bless {
ua => $ua,
url => $url,
+ args => '',
}, $class;
}
my $full_url = $self->{url} . "/riak/$uri";
$full_url =~ s{//+}{/}g;
$full_url =~ s{http:/}{http://};
+ $full_url .= '?' . $self->{args} if $self->{args};
$headers->{'Content-Type'} = 'application/json' unless exists $headers->{'Content-Type'};
+ $headers->{'Host'} = $1 if $full_url =~ m{http://([^/]+)};
my $req;
}
$req->header( $_ => $headers->{$_} ) foreach keys %$headers;
- $req->header( 'Host' => $1 ) if $self->{url} =~ m{http://([^/]+)};
# warn "## $method $full_url ", dump($req, $content);
my $response = $self->{ua}->request($req);