Skip to content

Commit

Permalink
Clarify documentation for decoded_content (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
topaz authored Nov 11, 2021
1 parent 874714c commit d384fdb
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lib/HTTP/Message.pm
Original file line number Diff line number Diff line change
Expand Up @@ -898,9 +898,14 @@ for details about how charset is determined.
=item $mess->decoded_content( %options )
Returns the content with any C<Content-Encoding> undone and for textual content
the raw content encoded to Perl's Unicode strings. If the C<Content-Encoding>
or C<charset> of the message is unknown this method will fail by returning
Returns the content with any C<Content-Encoding> undone and, for textual content
(C<Content-Type> values starting with C<text/>, exactly matching
C<application/xml>, or ending with C<+xml>), the raw content's character set
decoded into Perl's Unicode string format. Note that this
L<does not currently|https://github.com/libwww-perl/HTTP-Message/pull/99>
attempt to decode declared character sets for any other content types like
C<application/json> or C<application/javascript>. If the C<Content-Encoding>
or C<charset> of the message is unknown, this method will fail by returning
C<undef>.
The following options can be specified.
Expand Down

0 comments on commit d384fdb

Please sign in to comment.