cURL / Mailing Lists / curl-users / Single Mail

curl-users

CURL lib issue

From: Tomasz.Lacki <Tomasz.Lacki_at_primark.pl>
Date: Wed, 04 Jul 2001 14:34:26 +0200

Hi
is there any way to do sth like this for HTTP:
curl_easy_init
// setup params for uploading the file
....
curl_easy_perform
// setup params for http post
...

curl_easy_perform

// and then again
// setup params for uploading the file
....
curl_easy_perform

// and
curl_easy_cleanup

I do not know how to tell the library for the second file upload (HTTP
PUT) that I do not longer want to make HTTP post but just HTTP PUT, so
the lib thinks that I want to make some kind of POST and goes down. The
way out I have found is to deallocate curl and allocate again so for the
above example it would look like:
curl_easy_init
// setup params for uploading the file
....
curl_easy_perform
// setup params for http post
...

curl_easy_perform

// those lines are crucial
curl_easy_cleanup
curl_easy_init

// and then again
// setup params for uploading the file
....
curl_easy_perform

// and
curl_easy_cleanup

But then the performance is really poor.

Is there any way to make it work better.

Regards Tomek
Received on 2001-07-04