mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-27 07:34:35 +02:00
add debug for lwp backend
This commit is contained in:
parent
03623a61bf
commit
a49880f886
@ -124,6 +124,24 @@ sub request {
|
|||||||
autosave => 1));
|
autosave => 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($self->{output}->is_debug()) {
|
||||||
|
$self->{ua}->add_handler("request_send", sub {
|
||||||
|
my ($response, $ua, $handler) = @_;
|
||||||
|
|
||||||
|
$self->{output}->output_add(long_msg => "======> request send", debug => 1);
|
||||||
|
$self->{output}->output_add(long_msg => $response->as_string, debug => 1);
|
||||||
|
return ;
|
||||||
|
});
|
||||||
|
$self->{ua}->add_handler("response_done", sub {
|
||||||
|
my ($response, $ua, $handler) = @_;
|
||||||
|
|
||||||
|
$self->{output}->output_add(long_msg => "======> response done", debug => 1);
|
||||||
|
$self->{output}->output_add(long_msg => $response->as_string, debug => 1);
|
||||||
|
return ;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (defined($request_options->{no_follow})) {
|
if (defined($request_options->{no_follow})) {
|
||||||
$self->{ua}->requests_redirectable(undef);
|
$self->{ua}->requests_redirectable(undef);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user