Skip to content

Commit

Permalink
Fixed POD, correct authentication header (thanks to Alex Howarth)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaare Rasmussen committed Mar 1, 2012
1 parent 026c04a commit 4d17c1a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/Role/REST/Client/Auth/Basic.pm
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ before '_call' => sub {
if ($self->has_user) {
my $user = $self->user;
my $passwd = $self->has_passwd ? $self->passwd : '';
$self->set_header('Basic ' . MIME::Base64::encode("$user:$passwd", ''));
$self->set_header('Authorization', 'Basic ' . MIME::Base64::encode("$user:$passwd", ''));
}
return;
};
Expand All @@ -51,7 +51,8 @@ Role::REST::Client::Auth::Basic - Basic Authentication for REST Client Role
package RESTExample;
use Moose;
with 'Role::REST::Client', 'Role::REST::Client::Auth::Basic';
with 'Role::REST::Client';
with 'Role::REST::Client::Auth::Basic';
sub bar {
my ($self) = @_;
Expand Down

0 comments on commit 4d17c1a

Please sign in to comment.