in reply to Re: man HTTP::Request::Common
in thread man HTTP::Request::Common

Don't know if you saw this, so I will send it again (I replied to the top level instead of to your message).

Right now, I just want the easiest way to download specific URLs to files.

It seems that a lot of (related) packages exist:
HTTP::Request
HTTP::Request::Common
HTTP::Response
LWP::Simple
LWP::UserAgent
and even Net::HTTP

I know that "more than one way exists to do it, but some explanation of the differences could help me choose the best way (for me). Thanks again.

Replies are listed 'Best First'.
Re^3: man HTTP::Request::Common
by Aristotle (Chancellor) on Jul 03, 2002 at 22:32 UTC

    Actually, they are not all the same thing - they supplement each other like gearwheels. The full process is that you set up a HTTP::Request, which sent to the server via the Net::HTTP module by a LWP::UserAgent object which then constructs a HTTP::Response.

    The HTTP::Request::Common module is simply a convenience tool that provides shortcuts to common tasks in setting up HTTP::Requests.

    Likewise, the LWP::Simple module is a library that provides shortcuts to common web-related tasks. As long as you don't need finegrained control over the process, it takes care of the entire mumbojumbo of setting up a UserAgent, a Request to pass to it, and pulling the data back out of the Response and reduces it to something as simple as $page = get("http://foo.com/bar.html");.

    In your case, the gestore function does exactly what you want, as a look into the module's documentation would reveal.

    In general, if you have a task and don't know which module to look at first, the best idea is probably to look at whatever is called ::Simple* or ::Easy*.

    Makeshifts last the longest.