0) ? 1 : 0;
}
sub download {
my ($self, $file_name) = @_;
$file_name ||= 'RESTCountries.json';
my $uri = $self->api_url . 'all';
my $response = $self->user_agent->request('GET', $ur
n case the api_url was updated.
$self->server($self->api_url);
$self->type(qq|application/json|);
my $response_data;
my $cache_key = md5_hex($endpoint . encode_sereal($queries));
data as JSON file. Optional path and file name.
# Using default path and file name.
$api->download();
# Using specific path and file name.
$api->download('/tmp/countries.json');
Che