mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-12 22:19:44 +00:00
Stop agent on 404 only if GET /agents is ok, in case API is down/broken for awhile and 404 is happening for everything.
This commit is contained in:
@@ -159,6 +159,23 @@ sub get {
|
||||
return $resource_objects;
|
||||
}
|
||||
|
||||
sub head {
|
||||
my ($self, %args) = @_;
|
||||
|
||||
have_required_args(\%args, qw(
|
||||
link
|
||||
)) or die;
|
||||
my ($link) = $args{link};
|
||||
|
||||
eval {
|
||||
$self->_request(
|
||||
method => 'HEAD',
|
||||
link => $link,
|
||||
);
|
||||
};
|
||||
return $EVAL_ERROR;
|
||||
}
|
||||
|
||||
# For a successful POST, the server sets the Location header with
|
||||
# the URI of the newly created resource.
|
||||
sub post {
|
||||
|
Reference in New Issue
Block a user