Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: LWP::UserAgent downloading zip files

by Gtforce (Sexton)
on Sep 17, 2017 at 12:10 UTC ( [id://1199548]=note: print w/replies, xml ) Need Help??


in reply to Re: LWP::UserAgent downloading zip files
in thread LWP::UserAgent downloading zip files

Funnily enough, the POST works just fine and gets me the file I'm looking for. I've seen other snippets of code all over the place and using POST to download files. I've got to sit down and look at the difference between these two. Thanks, 1nickt.

  • Comment on Re^2: LWP::UserAgent downloading zip files

Replies are listed 'Best First'.
Re^3: LWP::UserAgent downloading zip files
by 1nickt (Canon) on Sep 17, 2017 at 12:47 UTC

    You are welcome. Trust me, there is a difference between GET and POST requests. It is quite possible that a server could be configured to accept GET and POST requests for the same URL, but your program should not assume that.

    As far as seeing snippets of code: Try to stick to the official documentation for the modules you use (and a good place to look for implementation examples is in the module distribution's tests) and build up your code following that so you know what you are doing. Copying chunks of code you spot in various places in the wild can be useful but should be accompanied with working hard to understand how the tools you are using really work.


    The way forward always starts with a minimal test.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2024-04-25 18:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found