cURL / Mailing Lists / curl-library / Single Mail

curl-library

problem with libcurl 7.8 POST

From: Nataly Geimakher <nataly_at_mercury.co.il>
Date: Tue, 31 Jul 2001 10:10:57 +0200

Hello,
I am using libcurl 7.8 version trying to post data to the server (java
servlet)
through following lines of code (after I get curl object from init):
 ...curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1);
    curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
    curl_easy_setopt(curl, CURLOPT_POST,1);
    curl_easy_setopt(curl, CURLOPT_URL, "UrlOfMyServlet "); (something like
http://Site/Servlet)
    char* params = "reportName=resp&timeFrame=Month";
    curl_easy_setopt(curl,CURLOPT_POSTFIELDS, params);
    res = curl_easy_perform(curl);

the output, that I get when verbose is set, is following:
> POST /UrlOfMyServlet HTTP/1.1
        Host: mouse:8080
        Pragma: no-cache
        Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
        Content-Length: 31
        Content-Type: application/x-www-form-urlencoded
        
        reportName=resp&timeFrame=Month
        * Closing live connection (#0)

Even though I do get to that servlet on the server's side, I do not see any
of the parameters that I send with the post!!
(site, that I am connecting to, is run through Tomcat and I send tomcat's
port in url, if it matters)
Can you please tell me, what am I doing wrong?

Thank you.
Nataly.

_______________________________________________
Curl-library mailing list
http://curl.haxx.se/libcurl/
Received on 2001-08-02