cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Sending data in the URL string instead of a callback

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 8 Oct 2003 22:08:48 +0200 (CEST)

On Wed, 8 Oct 2003, Sharma, Amit wrote:

(since you're talking libcurl stuff, I would suggest posting questions like
this to the curl-library mailing list instead)

> I Need to submit data to a remote server by appending it to the URL string.
> Something like
> http://IP_Adress/<<WebApplPathName>>/DataServlet?XML="+Buffer1+"&Process="+B
> uffer2 <http://IP_Adress/<<WebApplPathName>>/DataServlet?XML=> where Buffer1
> and Buffer2 are the buffers that would hold the data to be sent to the
> remote server.
>
> I was wondering if I could fill the buffers in the URL easy handle option
> itself.

You can pass URLs of _any_ size to libcurl using CURLOPT_URL.

> This way I wouldn't have to setup any callbacks for uploading data.

For normal posts, you don't need callbacks anyway thanks to
CURLOPT_POSTFIELDS.

> Ofcourse I would have to setup a callback for receiving the response from
> the server.

To receive the response you still need a callback, or direct it to a file and
inspect it later.

-- 
 Daniel Stenberg -- curl: been grokking URLs since 1998
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
Received on 2003-10-08