cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: sending xml to http

From: Jeff Pohlmeyer <yetanothergeek_at_gmail.com>
Date: Fri, 30 May 2008 03:56:03 -0500

Avinash Vijayvergia <avinashs36_at_yahoo.com> wrote:

> I am a new user for curl. Can you tell me how to start with it? I need to
> send an xml file to a url. Can some one tell me how to do that?

Since you at least mentioned you are using HTTP, here
are a few basic ways to accomplish this:

1. The http PUT command, not very common and probably
   not what you want.

2. Send the data using standard http POST, this is
   similar to what happens when you type something
   into a text area in an HTML form.

3. Upload the file using a multipart/formdata POST,
   this is more like when a web page offers a "browse"
   button to select a file to upload.

Certainly all of these are possible with curl/libcurl,
but until you can tell us a little more about what you
want to do, you might want to have a look here:

  http://curl.haxx.se/docs/httpscripting.html

 - Jeff
Received on 2008-05-30