Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Curl with perl

by clscott (Friar)
on Jan 23, 2009 at 00:47 UTC ( [id://738351]=note: print w/replies, xml ) Need Help??


in reply to Curl with perl

Are you aware of LWP? It could make your life easier
$xml ='<?xml version="1.0" encoding="UTF-8"?> <TEST xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <TEST1> <ID>1223</ID> <DESCRIPTION>XXXXX</DESCRIPTION> </TEST1> </TEST> '; use LWP::UserAgent; my $curl = LWP::UserAgent->new( timeout => 120 ); my $response = $curl->post($url, Content => $xml); if ($response->is_success) { print $response->decoded_content; # or whatever } else { die $response->status_line; }
--
Clayton

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2024-03-29 08:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found