Hi,
I am using libwww-perl-5.53_94. I want to ask how to set the host in the
header. I can do it with direct socket, but seems not work with LWP. Any
idea? Thanks a lot.
Angela.
=== LWP === not work
my $ua = new LWP::UserAgent;
my $request = new HTTP::Request('GET', 'http://host1.com/test?name=angela);
$request_login->header('Host' => host2.com');
my $response = $ua->request($request);
=== Socket === work
my $address = sockaddr_in(80, inet_aton('http://host1.com'));
with header like:
POST /test HTTP/
Referer: http://host1.com/test
Host: host2.com
...
name=angela