diff options
Diffstat (limited to 'lib/MooseX')
-rw-r--r-- | lib/MooseX/Net/API.pm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/MooseX/Net/API.pm b/lib/MooseX/Net/API.pm index 9b1d0fe..defbe2c 100644 --- a/lib/MooseX/Net/API.pm +++ b/lib/MooseX/Net/API.pm @@ -242,7 +242,14 @@ sub net_api_method { @deserialize_order ); } - return $content if ( $res->is_success ); + if ( $res->is_success ) { + if (wantarray) { + return ( $content, $res ); + } + else { + return $content; + } + } die MooseX::Net::API::Error->new( http_error => $res, |