Alice

 view release on metacpan or  search on metacpan

lib/Alice/HTTP/Response.pm  view on Meta::CPAN


sub send {
  my $self = shift;
  my $res = $self->SUPER::finalize;
  $res->[2] = [map encode("utf8", $_), @{$res->[2]}];
  return $self->{cb}->($res);
}

sub notfound {
  my $self = shift;
  return $self->{cb}->([404, ["Content-Type", "text/plain", "Content-Length", 9], ['not found']]);
}

sub ok {
  my $self = shift;
  return $self->{cb}->([200, ["Content-Type", "text/plain", "Content-Length", 2], ['ok']]);
}

sub writer {
  my $self = shift;
  my $response = $self->SUPER::finalize;



( run in 1.539 second using v1.01-cache-2.11-cpan-788537b7465 )