summary refs log tree commit diff
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2010-05-11 09:24:30 +0200
committerfranck cuny <franck@lumberjaph.net>2010-05-11 09:24:30 +0200
commitfa1773ee20468186dc8f9450b7168e749c463e6e (patch)
tree4ed9df5f200f4baadb1eb14ccc7c411702dc2c7f
parentfetch object content (diff)
downloadanyevent-riak-fa1773ee20468186dc8f9450b7168e749c463e6e.tar.gz
remove client_id
-rw-r--r--lib/AnyEvent/Riak/Role/HTTPUtils.pm13
1 files changed, 2 insertions, 11 deletions
diff --git a/lib/AnyEvent/Riak/Role/HTTPUtils.pm b/lib/AnyEvent/Riak/Role/HTTPUtils.pm
index 1963d88..399f369 100644
--- a/lib/AnyEvent/Riak/Role/HTTPUtils.pm
+++ b/lib/AnyEvent/Riak/Role/HTTPUtils.pm
@@ -8,19 +8,11 @@ use URI;
 
 use MIME::Base64;
 
-has client_id   => (
-    is  => 'rw',
-    isa => 'Str',
-    default =>
-      sub { "perl_anyevent_riak" . encode_base64(int(rand(10737411824)), '') }
-);
-
 sub _build_uri {
-    my ($self, $host, $path, $options) = @_;
-    my $uri = URI->new($host);
+    my ($self, $path, $options) = @_;
+    my $uri = URI->new($self->host);
     $uri->path(join("/", @$path));
     $uri->query_form($self->_build_query($options));
-    warn $uri->as_string;
     return $uri->as_string;
 }
 
@@ -28,7 +20,6 @@ sub _build_headers {
     my ($self, $options) = @_;
     my $headers = delete $options->{headers} || {};
 
-    warn $self->client_id;
     $headers->{'X-Riak-ClientId'} = $self->client_id;
     $headers->{'Content-Type'}    = 'application/json'
       unless exists $headers->{'Content-Type'};