Hi All,<br><br>Does anyone have any experience with WWW::Curl:Easy?<br><br>I&#39;m needing to convert some code that currently uses HTTP::Request and LWP::UserAgent into WWW::Curl::Easy code.<br>I&#39;ve got most of it working, there just one case that is not.<br>
<br>I need to send content along with this particular query.<br>Here is what I need to convert to WWW::Mechanize:<br><br>---------------------- CODE ----------------------<br><br><span style="font-family: courier new,monospace;">    my $req = new HTTP::Request POST =&gt; $url;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    $req-&gt;content_type(&quot;text/xml&quot;);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    $req-&gt;header(&quot;Authorization&quot;, &quot;Basic &quot;.$self-&gt;{&#39;config&#39;}-&gt;{&#39;creds_64&#39;});</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    $req-&gt;header(&quot;Cookie&quot;, $self-&gt;{&#39;config&#39;}{&#39;seller_cookies&#39;});</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    $req-&gt;header(&quot;FileFormat&quot;, &quot;TabDelimited&quot;);</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    $req-&gt;header(&quot;BatchID&quot;, &quot;Y&quot;);</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    $req-&gt;content($content);</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    my $response = $self-&gt;{&#39;ua&#39;}-&gt;request($req);</span><br><br>
---------------------- /CODE ----------------------<br><br>That code works perfectly fine.<br><br>This is what I have so far for WWW::Curl::Easy:<br><br>
---------------------- CODE ----------------------<br><br><span style="font-family: courier new,monospace;">    my @headers = (&#39;Content-Type: text/xml&#39;,</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">                &#39;Authorization: Basic &#39;.$self-&gt;{&#39;config&#39;}-&gt;{$self-&gt;{&#39;locale&#39;}}-&gt;{&#39;seller_creds_64&#39;},</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">                &#39;Cookie: &#39;.$self-&gt;{&#39;config&#39;}{&#39;seller_cookies&#39;},</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">                &#39;FileFormat: TabDelimited&#39;,</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">                &#39;BatchID: Y&#39;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    );</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    $self-&gt;{&#39;curl&#39;} = new WWW::Curl::Easy;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    $self-&gt;{&#39;curl&#39;}-&gt;setopt(CURLOPT_HEADER,0);</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    $self-&gt;{&#39;curl&#39;}-&gt;setopt(CURLOPT_HTTPHEADER,\@headers);</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    $self-&gt;{&#39;curl&#39;}-&gt;setopt(CURLOPT_POST, 1);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    $self-&gt;{&#39;curl&#39;}-&gt;setopt(CURLOPT_POSTFIELDS, $content);</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    $self-&gt;{&#39;curl&#39;}-&gt;setopt(CURLOPT_URL, $url);</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    open (my $response_handle, &quot;&gt;&quot;, \$response_body);</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    $self-&gt;{&#39;curl&#39;}-&gt;setopt(CURLOPT_WRITEDATA,$response_handle);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    my $retcode = $self-&gt;{&#39;curl&#39;}-&gt;perform;</span><br>

<br>---------------------- /CODE ----------------------<br><br>But I&#39;m getting a message back saying that it&#39;s not seeing the added $content properly/at all.<br><br>I&#39;m very new to WWW::Curl::Easy and so could use any help.<br>
As I said before, I have standard page curls working perfectly fine, including ones where I send the extra header information.<br>It&#39;s just when I try to send extra $content.<br><br>I think this content might need to be sent as an attachment somehow....<br>
<br>Thanks in advance to anyone who can help me out.<br><br>--Alex<br>