Loading GitLab/API.pm +10 −7 Original line number Original line Diff line number Diff line Loading @@ -183,7 +183,7 @@ sub clean_data { my $data = $response->decoded_content; my $data = $response->decoded_content; utf8::decode($data); utf8::decode($data); return $self->json->decode($data); return ($response, $self->json->decode($data)); } } #-- Request wrappers --------------------------------------------------------- #-- Request wrappers --------------------------------------------------------- Loading @@ -195,9 +195,12 @@ sub exec_request { my $rtargs = { %{$args}{@rtkeys} }; my $rtargs = { %{$args}{@rtkeys} }; delete @{$args}{@rtkeys}; delete @{$args}{@rtkeys}; my $argstr = join ", ", if ($log->is_debug) { map { "$_ => " . ($_ eq "password" ? "<redacted>" : "\"$args->{$_}\"") } (keys %$args); my $argstr = join ", ", map { "$_ => " . ($_ eq "password" ? "<redacted>" : "\"$args->{$_}\"") } (keys %$args); $log->debug("GitLab::API::$tmpl->{name}(" . $argstr . ") called"); my $rtstr = join ", ", map { "$_ => $rtargs->{$_}" } (@rtkeys); $log->debug("called GitLab::API::$tmpl->{name}($argstr)"); $log->debug("request options: [$rtstr]"); } my $uri = $self->create_uri($tmpl, $args); my $uri = $self->create_uri($tmpl, $args); Loading Loading @@ -249,9 +252,9 @@ sub exec_request { } } if ($log->is_trace) { if ($log->is_trace) { $log->trace("-- HTTP REQUEST ", "-" x 25, "\n", $response->request->as_string); $log->trace("---- HTTP REQUEST ".("-" x 25)."\n".$response->request->as_string); $log->trace("-- HTTP RESPONSE ", "-" x 25, "\n", $response->as_string); $log->trace("---- HTTP RESPONSE ".("-" x 25)."\n".$response->as_string); $log->trace("------------------", "-" x 25); $log->trace("--------------------".("-" x 25)); } } $log->debug("status: " . $response->status_line); $log->debug("status: " . $response->status_line); Loading GitLab/API/Iterator.pm +2 −3 Original line number Original line Diff line number Diff line Loading @@ -120,8 +120,7 @@ sub next_block { $xurl->query_param(per_page => $self->{per_page}); $xurl->query_param(per_page => $self->{per_page}); $log->debug("GET " . $xurl); $log->debug("GET " . $xurl); my $response = $self->api->http->get($xurl); my ($response, $data) = $self->api->clean_data($self->api->http->get($xurl)); my $data = $self->api->clean_data($response); if ($log->is_trace) { if ($log->is_trace) { $log->trace("---- HTTP REQUEST ".("-" x 25)."\n".$response->request->as_string); $log->trace("---- HTTP REQUEST ".("-" x 25)."\n".$response->request->as_string); Loading @@ -129,7 +128,7 @@ sub next_block { $log->trace("--------------------".("-" x 25)); $log->trace("--------------------".("-" x 25)); } } $log->debug("status: ", $response->status_line); $log->debug("status: " . $response->status_line); if (!$response->is_success) { if (!$response->is_success) { $self->{good} = 0; $self->{good} = 0; Loading Loading
GitLab/API.pm +10 −7 Original line number Original line Diff line number Diff line Loading @@ -183,7 +183,7 @@ sub clean_data { my $data = $response->decoded_content; my $data = $response->decoded_content; utf8::decode($data); utf8::decode($data); return $self->json->decode($data); return ($response, $self->json->decode($data)); } } #-- Request wrappers --------------------------------------------------------- #-- Request wrappers --------------------------------------------------------- Loading @@ -195,9 +195,12 @@ sub exec_request { my $rtargs = { %{$args}{@rtkeys} }; my $rtargs = { %{$args}{@rtkeys} }; delete @{$args}{@rtkeys}; delete @{$args}{@rtkeys}; my $argstr = join ", ", if ($log->is_debug) { map { "$_ => " . ($_ eq "password" ? "<redacted>" : "\"$args->{$_}\"") } (keys %$args); my $argstr = join ", ", map { "$_ => " . ($_ eq "password" ? "<redacted>" : "\"$args->{$_}\"") } (keys %$args); $log->debug("GitLab::API::$tmpl->{name}(" . $argstr . ") called"); my $rtstr = join ", ", map { "$_ => $rtargs->{$_}" } (@rtkeys); $log->debug("called GitLab::API::$tmpl->{name}($argstr)"); $log->debug("request options: [$rtstr]"); } my $uri = $self->create_uri($tmpl, $args); my $uri = $self->create_uri($tmpl, $args); Loading Loading @@ -249,9 +252,9 @@ sub exec_request { } } if ($log->is_trace) { if ($log->is_trace) { $log->trace("-- HTTP REQUEST ", "-" x 25, "\n", $response->request->as_string); $log->trace("---- HTTP REQUEST ".("-" x 25)."\n".$response->request->as_string); $log->trace("-- HTTP RESPONSE ", "-" x 25, "\n", $response->as_string); $log->trace("---- HTTP RESPONSE ".("-" x 25)."\n".$response->as_string); $log->trace("------------------", "-" x 25); $log->trace("--------------------".("-" x 25)); } } $log->debug("status: " . $response->status_line); $log->debug("status: " . $response->status_line); Loading
GitLab/API/Iterator.pm +2 −3 Original line number Original line Diff line number Diff line Loading @@ -120,8 +120,7 @@ sub next_block { $xurl->query_param(per_page => $self->{per_page}); $xurl->query_param(per_page => $self->{per_page}); $log->debug("GET " . $xurl); $log->debug("GET " . $xurl); my $response = $self->api->http->get($xurl); my ($response, $data) = $self->api->clean_data($self->api->http->get($xurl)); my $data = $self->api->clean_data($response); if ($log->is_trace) { if ($log->is_trace) { $log->trace("---- HTTP REQUEST ".("-" x 25)."\n".$response->request->as_string); $log->trace("---- HTTP REQUEST ".("-" x 25)."\n".$response->request->as_string); Loading @@ -129,7 +128,7 @@ sub next_block { $log->trace("--------------------".("-" x 25)); $log->trace("--------------------".("-" x 25)); } } $log->debug("status: ", $response->status_line); $log->debug("status: " . $response->status_line); if (!$response->is_success) { if (!$response->is_success) { $self->{good} = 0; $self->{good} = 0; Loading