logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Catalyst::Response::Writer - Proxy over the PSGI Writer

Authors

       Catalyst Contributors, see Catalyst.pm

Description

       This wraps the PSGI writer (see PSGI.pod\Delayed-Response-and-Streaming-Body) for more.  We wrap this
       object so we can provide some additional methods that make sense from inside Catalyst

Methods

       This class does the following methods

   writeclose
       These delegate to the underlying PSGI writer object

   write_encoded
       If the application defines a response encoding (default is UTF8) and the content type is a type that
       needs to be encoded (text types like HTML or XML and Javascript) we first encode the line you want to
       write.  This is probably the thing you want to always do.  If you use the \write method directly you will
       need to handle your own encoding.

Name

       Catalyst::Response::Writer - Proxy over the PSGI Writer

Synopsis

           sub myaction : Path {
             my ($self, $c) = @_;
             my $w = $c->response->writer_fh;

             $w->write("hello world");
             $w->close;
           }

See Also