For example,
[~] $ cat > tmp/referer.pl require LWP::UserAgent; my $r = HTTP::Request::->new('GET','http://web2/cgi-bin/printenv'); $r->header("REFERER", "foo"); my $ua = LWP::UserAgent::->new; print $ua->request($r)->content; [~] $ perl !$ perl tmp/referer.pl DOCUMENT_ROOT="/usr/local/apache/htdocs" GATEWAY_INTERFACE="CGI/1.1" HTTP_HOST="web2" HTTP_REFERER="foo" HTTP_USER_AGENT="libwww-perl/5.48" PATH="/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin" QUERY_STRING="" REMOTE_ADDR="192.168.0.1" REMOTE_PORT="2524" REQUEST_METHOD="GET" REQUEST_URI="/cgi-bin/printenv" [snip remainder of environment]
-dlc
In reply to Re: LWP::UserAgent Questions
by dchetlin
in thread LWP::UserAgent Questions
by Martin A
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |