You should use protocol method of HTTP::Request, which is inherited from HTTP::Message. The resulting code should be something like this:
#!/usr/bin/perl use LWP::UserAgent; $ua = LWP::UserAgent->new; $ua->agent("$0/0.1 " . $ua->agent); $req = HTTP::Request->new(GET => 'http://www.perlmonks.org/'); # here is what you need $req->protocol('HTTP/1.0'); $res = $ua->request($req); if ($res->is_success) { print $res->content; } else { print "Error: " . $res->status_line . "\n"; }
HTH, Valerio
In reply to Re: LWP and force protocol 1.0
by valdez
in thread LWP and force protocol 1.0
by niemeand
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |