Skip to content

Commit

Permalink
add print out of called URL with GOCARDLESS_DEBUG
Browse files Browse the repository at this point in the history
so we can check query params are being passed in correctly
  • Loading branch information
leejo committed Aug 30, 2017
1 parent a2720d8 commit 9410ef5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/Business/GoCardless/Client.pm
Original file line number Diff line number Diff line change
Expand Up @@ -348,10 +348,12 @@ sub _api_request {

my $req = HTTP::Request->new(
# passing through the absolute URL means we don't build it
$method => $path =~ /^http/
$method => my $uri = $path =~ /^http/
? $path : join( '/',$self->base_url . $self->api_path . $path ),
);

say STDERR "GOCARDLESS -> $uri" if $ENV{GOCARDLESS_DEBUG};

$req->header( 'Authorization' => "Bearer " . $self->token );
$req->header( 'Accept' => 'application/json' );

Expand Down
2 changes: 1 addition & 1 deletion t/004_end_to_end_pro.t
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ my $NewBill = $GoCardless->bill( $Bill->id );
is( $NewBill->id,$Bill->id,'getting bill with same id gives same bill' );

my $Paginator = $GoCardless->bills(
# TOOD: args here
limit => 500,
);

note explain $Paginator->info if $DEBUG;
Expand Down

0 comments on commit 9410ef5

Please sign in to comment.