NAME
Net::Blossom::Server::UploadResult - Result of a Blossom blob upload
SYNOPSIS
use Net::Blossom::Server::UploadResult;
my $result = Net::Blossom::Server::UploadResult->new(
descriptor => $blob,
created => 1,
);
DESCRIPTION
Net::Blossom::Server::UploadResult describes the outcome of a successful upload. It keeps the blob descriptor separate from whether the blob bytes were newly stored.
Server routing can use created to choose the BUD-02 response status: 201 for a newly stored blob and 200 when the blob already existed.
CONSTRUCTOR
new
my $result = Net::Blossom::Server::UploadResult->new(%args);
Required arguments:
descriptorA
Net::Blossom::BlobDescriptorfor the uploaded blob.created1when the blob bytes were newly stored, or0when the blob already existed.
Unknown arguments or invalid values croak.
ACCESSORS
descriptor
Returns the Net::Blossom::BlobDescriptor.
created
Returns 1 for a newly stored blob and 0 for an existing blob.