Apache2::REST::Response - Container for an API Response.
... $resp->status(Apache2::Const::HTTP_OK) ; $resp->message('Everything went smootly') ; $resp->data()->{'item'} = 'This is the returned item' ; ...
Builds a new one.
Cleanup this response so it can go out without any empty attributes.
Internal use.
Get/Sets the HTTP status of this response
Get/Sets a more explicit message related to the status
Hash of the actual data returned by the handler (see Apache2::REST::Handler ).
Get/Set the binary content to return in case the bin writer is used.
Get/Set the MIME type of the binary content.
Get/Set the Apache2::REST::Stream to render this response as a stream of data.
Setting this will trigger a '_Stream' version of writers to be used.
Get/Set the Apache2::REST::Stream to render this response as a stream of data composed of multipart response parts.
Setting this will trigger a '_multipart' version of writers to be used.
To install Apache2::REST, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Apache2::REST
CPAN shell
perl -MCPAN -e shell install Apache2::REST
For more information on module installation, please visit the detailed CPAN module installation guide.