Specifying Protocol thru LWP::UserAgent

prashanthgn
prashanthgn used Ask the Experts™
on
Hi,

   Is there any function thru which, I can restrict my HTTP requset to use a particular parotocol (either HTTP, HTTPS, FTP, GOPHER etc..).

Prashanth

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
The LWP will use the protocol specified at the beginning of the URI

From man LWP :

$req = HTTP::Request->new(GET => 'ftp://me:passwd@ftp.some.where.com/');
$req->header(Accept => "text/html, */*;q=0.1");

Commented:
You could also play with LWP::Protocol (but without more information, I think that you should stick with my previous answer...)

As far as I remember the protocols handled by LWP are HTTP, HTTPS, FTP, GOPHER, FILE, MAILTO, and NEWS.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial