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

Web::Machine::Util::BodyEncoding - Module to handle body encoding

Authors

       •   Stevan Little <stevan@cpan.org>

       •   Dave Rolsky <autarch@urth.org>

Description

       This handles the body encoding.

Functions

       "encode_body_if_set ( $resource, $response, $metadata )"
           If the $response has a body, this will call "encode_body".

       "encode_body ( $resource, $response, $metadata )"
           This  will  find the right encoding (from the 'Content-Encoding' entry in the $metadata HASH ref) and
           the right charset (from the 'Charset'  entry  in  the  $metadata  HASH  ref),  then  find  the  right
           transformers  in the $resource. After that it will attempt to convert the charset and encode the body
           of the $response. Once completed it will set the "Content-Length" header in the response as well.

           CAVEAT: Note that currently this subroutine doesn't do anything when the body is returned as  a  CODE
           ref. This is a bug to be remedied in the future.

Name

       Web::Machine::Util::BodyEncoding - Module to handle body encoding

Support

       bugs may be submitted through <https://github.com/houseabsolute/webmachine-perl/issues>.

Synopsis

         use Web::Machine::Util::BodyEncoding;

Version

       version 0.17

See Also