$ua->get vs $ua->request

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
# Request document and parse it as it arrives
  $res = $ua->request(HTTP::Request->new(GET => $url));

And this

  $ua = LWP::UserAgent->new;
  $response = $ua->get("$url");

Why sometimes it is us-get and sometime it is us->request?

Re: $ua->get vs $ua->request

nntp wrote:

Quoted text here. Click to load it

Often an API provides a shorthand mechanism to combine serveral API
calls that are frequently used together into one.

Sometimes a programmer will use the shorthand, sometimes not.  Sometimes
  one programmer will use it and another will not.  Sometimes the
shorthand is a late addittion to the API an some calling code predates
its introduction.

To know why in any particular case you'd have to ask the programmers in

Quoted text here. Click to load it

Site Timeline