diff options
Diffstat (limited to '')
-rw-r--r-- | lib/MooseX/Net/API/Role/Serialization.pm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/MooseX/Net/API/Role/Serialization.pm b/lib/MooseX/Net/API/Role/Serialization.pm index fe86b9f..f10a101 100644 --- a/lib/MooseX/Net/API/Role/Serialization.pm +++ b/lib/MooseX/Net/API/Role/Serialization.pm @@ -23,6 +23,8 @@ has serializers => ( sub get_content { my ($self, $result) = @_; + return undef unless $result->content; + my $content_type = $self->api_format // $result->header('Content-Type'); $content_type =~ s/(;.+)$//; |