Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

curl in Perl (GET and POST)

by kepler (Scribe)
on Aug 22, 2015 at 08:58 UTC ( #1139484=perlquestion: print w/replies, xml ) Need Help??
kepler has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

I want to use in Perl the equivalente expression in Php:

curl -F "targets=@<filename>" "http://mydomain.com/script.php?<args>"

I provide a filename with text data (<filename>) and the args (<args>).

So it's a Post and Get request at the same time...

Any ideas?

Kind regards,

Kepler

Replies are listed 'Best First'.
Re: curl in Perl (GET and POST)
by Laurent_R (Canon) on Aug 22, 2015 at 09:42 UTC
Re: curl in Perl (GET and POST)
by hippo (Canon) on Aug 22, 2015 at 13:46 UTC
    So it's a Post and Get request at the same time... Any ideas?

    It's just a POST where the URL being posted to has a query string. See the POST section of the LWP cookbook for examples of how to do this in Perl.

Re: curl in Perl (GET and POST)
by Anonymous Monk on Aug 22, 2015 at 09:00 UTC

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2018-12-18 22:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many stories does it take before you've heard them all?







    Results (83 votes). Check out past polls.

    Notices?