Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Properly handle 204 responses

  • Loading branch information...
commit ccf656f962556be1b3cb75905bb2cdfa3f4d51e8 1 parent fbdb48d
@lkundrak authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  lib/WWW/GoodData/Agent.pm
View
3  lib/WWW/GoodData/Agent.pm
@@ -147,6 +147,9 @@ sub request
# Pass processed response from subrequest (redirect)
return $response if ref $response eq 'HASH';
+ # Do not bother checking content and type if there's none
+ return undef if $response->code == 204;
+
# Decode
my $decoded = eval { decode_json ($response->content) }
if $response->header ('Content-Type') =~ /^application\/json(;.*)?/;
Please sign in to comment.
Something went wrong with that request. Please try again.