cURL / Mailing Lists / curl-library / Single Mail


problem with libcurl 7.8 POST

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

I am using libcurl 7.8 version trying to post data to the server (java
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
    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
        * 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.

Curl-library mailing list
Received on 2001-08-02