cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: specify form name in POST

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 25 Feb 2008 13:44:56 +0100 (CET)

On Mon, 25 Feb 2008, Tiberiu Motoc wrote:

> I was wondering if it is possible to specify the form name in a POST
> request. I know you can do that using the command line:
> curl -F "my_form[uploaded_data]=@index.xml"
> http://localhost:3000/indexes.xml
> , so you should be able to do it from the code.
>
> (the index page has a form with name="my_form")

The name of the form is not passed along with that, and in fact the name of
the form is never passed along to the server since it is used only for
browser-local stuff.

The name of the input field is however relevant, possible to send and is what
you send in the above example.

And you do that with curl_formadd() of course.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2008-02-25