ping
curl https://cloud.seafile.com/api2/ping/
"pong"
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->timeout(10);
$ua->env_proxy;
$ua->agent("Mozilla/8.0");
my $host = "http://10.24.217.138:8000/api2/ping/";
my $response = $ua->get($host);
$ua->default_headers;
if ($response->is_success) {
print $response->decoded_content; # or whatever
}
else {
die $response->status_line;
}