cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Https post and xml file

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 20 Jun 2006 20:03:36 +0200 (CEST)

On Tue, 20 Jun 2006, Shrestha, Anupama wrote:

>> Do I have to do multipart forms to post an xml file?

No.

>> or Can I do with simple easy commands to post a xml file.

Yes you can. Although multipart forms are also made with "simple easy
commands".

>> Can I open a xml file, read a xml file and https post that xml file?
>> Any examples?

If you wanna upload with a callback:

  http://curl.haxx.se/lxr/source/docs/examples/post-callback.c

[snip]

>> curl_easy_setopt(curl, CURLOPT_POSTFIELDS, samplexml); => samplexml is
>> just a hard coded xml strings. Instead of this I want to pass the xml file.

So then either read the file to memory first or use a callback as explained
above.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2006-06-20