in reply to LWP is there any way to get "real" outgoing headers?
Have you taken the time to read the man pages (perldoc) that comes with the module?
I actually created an online application, simply by modifying, and expanding on the examples given in the pod.
Perhaps the following will be enough to get you going:
Mind you. This is part of an online Perl script I use. So I haven't included the HTML form stuff, just the routines, and functions for the form input, and all else. But what I've omitted should be trivial for anyone even slightly familiar with form handling, and basic HTML skills. :)#!/usr/bin/perl -w use Modern::Perl; use strict; use CGI qw/:standard/; use LWP; my $opt = ('http://'); my $url = param('url') || ''; my $product_id = ('MS-DOS/3.2'); my $agent = LWP::UserAgent->new(agent=> $product_id); my $ua = 'MS-DOS/3.2'; my $request = HTTP::Request->new(HEAD => $opt.$url); my $response = $agent->request($request); if($url) { &resp2; } else { &resp1; }
Best wishes.
--Chris
¡λɐp ʇɑəɹ⅁ ɐ əʌɐɥ puɐ ʻꜱdləɥ ꜱᴉɥʇ ədoH
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: LWP is there any way to get "real" outgoing headers?
by Anonymous Monk on May 24, 2014 at 04:17 UTC | |
by taint (Chaplain) on May 24, 2014 at 05:35 UTC | |
by Anonymous Monk on May 24, 2014 at 13:22 UTC |