summary refs log tree commit diff
path: root/lib/MooseX/Net/API/Role
diff options
context:
space:
mode:
Diffstat (limited to 'lib/MooseX/Net/API/Role')
-rw-r--r--lib/MooseX/Net/API/Role/Serialization.pm2
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/(;.+)$//;