develooper Front page | perl.libwww | Postings from August 2001

Easy redirect_ok

Thread Next
Marcus Brito
August 23, 2001 05:24
Easy redirect_ok
Message ID:
A quick question to LWP designers: what was the motivation for making 
the redirect_ok a method, instead of a property?

When a developer wants to make a single request using a different 
behavior than the default, and s/he must subclass UserAgent. Isn't this 
too overkill? I can think of a few situations where subclassing 
UserAgent would be actually better.

Wouldn't it be so much simpler if one could do something like this:

$req = HTTP::Request->new('GET', '');
$req->redirect_ok = 0;


$req = HTTP::Request->new('POST', 
'', [name1 => value1]);
$req->redirect_ok = 1;


Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About