Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Re: PERL HTTP posts.

by xode (Initiate)
on Aug 10, 2003 at 04:56 UTC ( #282558=note: print w/replies, xml ) Need Help??


in reply to Re: PERL HTTP posts.
in thread PERL HTTP posts.

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: Re: Re: PERL HTTP posts.
by sauoq (Abbot) on Aug 10, 2003 at 09:04 UTC
    why this instead of use LWP; ?

    You could actually use LWP; as the LWP module goes ahead and require()s the LWP::UserAgent module for you. But, the functionality you want is provided by the LWP::UserAgent module so you might as well use it directly.

    what's happening here?, in particular, who are the functions, who are the arguments and who are the results?

    The function being called is the new() funtion in the LWP::UserAgent class. It returns an LWP::UserAgent object which is then stored in $ua.

    what is agent("...") and why is it needed?

    That sets the user-agent header that the server gets when you make a request. The server can be configured to do behave differently based on the content of this header. You should probably use it to identify your program, but other uses would include emulating another browser like Mozilla or IE.

    The docs, which should be accessible via man LWP::UserAgent or perldoc LWP::UsesrAgent will come in handy. You'll probably also want to read perldoc HTTP::Request and perldoc HTTP::Response as soon as possible. Good luck.

    -sauoq
    "My two cents aren't worth a dime.";
    
Re: Re: Re: PERL HTTP posts.
by AcidHawk (Vicar) on Aug 10, 2003 at 08:07 UTC

    Have you looked at LWP::UserAgent.. ? All thoses lines are almost identically given in the docs with really clear explinations..?

    -----
    Of all the things I've lost in my life, its my mind I miss the most.
A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://282558]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2021-04-23 01:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?