in reply to HTTP::Response content or decoded_content
Data::Dumper is your friend. I've been hit by the same thing just last week and spent a few minutes on that as well. I first thought I received some image or something so I dumped the whole HTTP::Response object and noticed the gzip encoding in the headers. Luckily I noticed the decoded_content() sooner than I wasted time searching for and reading docs of a gzip module and decompressing it myself.
I think the two methods should have been named differently. content() should have been raw_content() and decoded_content() should have been content(). This can't be helped now, but I think the examples should be changed to use decoded_content().
|
|---|