curl-library
Newbie post question
Date: Tue, 11 Mar 2008 14:21:38 +0100
Hi,
I'm using a Firefox-plugin called livehttp-headers. It's very simple,
usually I got a record of what my browser has sent so I later on can
implement it in a c++ program.
For example this livehttp-headers info:
POST /signin.asp
action=signin&cwidth=1008&cheight=962&boll=MyUser&hav=MyPass
Will give this curl code:
curl_easy_setopt(curl, CURLOPT_URL,"http://www.somedomain.com/signin.asp";
string post_this= "action=signin&cwidth=1008&cheight=962&boll=MyUser&hav=MyPass"
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, post_this.c_str());
curl_easy_perform();
But now I'm stuck after gett this strange this from livehttp-headers
when trying to upload an image:
POST /Gallery2/UploadFile.aspx?Action=savenew
-----------------------------89686735721334176922016637833
Content-Disposition: form-data; name="Cat"
732894
-----------------------------89686735721334176922016637833
Content-Disposition: form-data; name="titel"
Pixel
-----------------------------89686735721334176922016637833
Content-Disposition: form-data; name="Desc"
I helgons bakgrundsfärg
-----------------------------89686735721334176922016637833
Content-Disposition: form-data; name="ReadStatus"
30
-----------------------------89686735721334176922016637833
Content-Disposition: form-data; name="thefile";
filename="helgonpixel.jpg"
Content-Type: image/jpeg
˙Ø˙ā
How do I do that post with curl? I've already searched the curl website
and google, but I'm stuck in what kind of post this is. I would
appreciate any help to get me in the rigth direction.
-- Med vänliga hälsningar Fredrik GustafssonReceived on 2008-03-11