cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: curl, javascript, and form submission

From: kap4lin <kap4lin_at_gmail.com>
Date: Fri, 6 Nov 2009 01:20:20 -0500

On Thu, Nov 5, 2009 at 11:57 PM, kap4lin <kap4lin_at_gmail.com> wrote:
> Thanks Daniel:
>
> On Thu, Nov 5, 2009 at 8:14 AM, Daniel Stenberg <daniel_at_haxx.se> wrote:
>> On Mon, 2 Nov 2009, P K wrote:
>>
>>> So, the question is: is it possible? If so, help me out ;) I can read the
>>> scripts on the page and also the ones in its public.js file... So, further
>>> information, if needed, can be provided.
>>
>> Sure. Record a "manual" session with LiveHTTPHeaders, then repeat that with
>> curl.
>
> I am not at all aware of this, so excuse my ignorance. Do you mean this project:
> http://livehttpheaders.mozdev.org/
>
> If so, I'll give it a try.

OK, I think I can understand some parts of this. I need some help in
the giving correct curl command. Consider the following header (some
details are masked):

---------------------------------------------------------
http://192.168.0.16/abcd.cgi

POST /abcd.cgi HTTP/1.1
Host: 192.168.0.16
User-Agent: A Long User Agent String
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.7
Accept-Encoding: gzip,deflate
Accept-Charset: UTF-8,*
Keep-Alive: 300
Connection: keep-alive
Referer: http://192.168.0.16/SomeFile.html
Authorization: Basic SomeEncodedString
Content-Type: application/x-www-form-urlencoded
Content-Length: 156
editRow=12&delrow=0&enable=0&name=uvwx&ip=192.168.0.123&protocol=1&priPort=1234&pubPort=1
HTTP/1.x 200 OK
Server: Embedded HTTP Server 1.23
Content-Type: text/html
Content-Length: 1064
Connection: close
-----------------------------------------------------

How do I convert this to a curl command?

-- 
Regards
PK
--------------------------------------
http://counter.li.org  #402424
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2009-11-06