Sure, it's exactly like implementing GET,
In your subclass of Apache2::REST::Handler, just implement DELETE or PUT:
sub PUT{
my ( $self , $req , $resp ) = @_;
.. Do put something in this resource ..
.. Fill resp if necessary ..
.. Return the appropriate http code
if( $somethingWentWrong ){
return Apache2::Const::HTTP_BAD_REQUEST ;
}
# else it's ok
return Apache2::Const::HTTP_OK ;
}
|