summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/WebService/ForecastIo.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/WebService/ForecastIo.pm b/lib/WebService/ForecastIo.pm
index 1761be1..31f06ab 100644
--- a/lib/WebService/ForecastIo.pm
+++ b/lib/WebService/ForecastIo.pm
@@ -91,6 +91,7 @@ sub request {
time => { isa => 'DateTime', optional => 1, coerce => 1 },
units => { isa => $units_type, default => 'si' },
exclude => { isa => "ArrayRef[$block_type]", default => sub { [] } },
+ raw => { isa => 'Bool', default => 0 },
);
my $uri = $self->_make_request_uri(%opts);
@@ -98,6 +99,7 @@ sub request {
my $response = $self->user_agent->get($uri);
if ($response->is_success) {
my $json = $response->decoded_content;
+ return $json if $opts{raw};
my $res = WebService::ForecastIo::Response->new($json);
return wantarray ? ($res,$json) : $res
}