Subject: | documentation suggestion: on max_size being exceeded |
The documentation for the constructor says on the max_size attribute:
If defined, responses larger than this will die with an error message
Which made me think it was going to die(), and I'd need to:
$ua = HTTP::Tiny->new(max_size => $max_size);
eval { $result = $ua->get($url); };
if ($@ ...)
Maybe instead that line could be:
If defined, responses larger than this will result in a pseudo HTTP status code of 599,
and a reason of "Internal Exception". The content field in the response will contain the
text of the exception.
I realise that is slightly repeating what is said later (on the content field containing the
exception), but I was reading the part of max_size, so that's where I wanted to hear about it.