Skip to content

Commit d5414cb

Browse files
bscanoalders
authored andcommitted
Add documentation for content_file
Currently, content_file contains the encoded version of a web response. This causes the `$mech->content()` method and the `:content_file` to have different encodings.
1 parent 2927bbe commit d5414cb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/WWW/Mechanize.pm

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,11 @@ L<LWP::UserAgent>. This lets you do things like
442442
and you can rest assured that the params will get filtered down
443443
appropriately. See L<LWP::UserAgent/get> for more details.
444444
445+
B<NOTE:> The file in C<:content_file> will contain the raw content of
446+
the response. If the response content is encoded (e.g. gzip encoded),
447+
the file will be encoded as well. Use $mech->save_content if you need
448+
the decoded content.
449+
445450
B<NOTE:> Because C<:content_file> causes the page contents to be
446451
stored in a file instead of the response object, some Mech functions
447452
that expect it to be there won't work as expected. Use with caution.

0 commit comments

Comments
 (0)