cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: New to CURL - HTTP POST to web service and response

From: Ray Satiro via curl-library <curl-library_at_cool.haxx.se>
Date: Thu, 18 Jun 2015 02:42:02 -0400

On 6/17/2015 3:12 PM, Fitzgerald, Kevin wrote:
>
> Hello, I am very new to CURL and I am trying to figure out the
> best/correct way to use CURL to perform the functions that I need to
> perform. I have written a C program running on an HP/UX box. I need to
> perform an HTTP POST to a web service and then receive a response back
> from the server. I have tried different things from examples I have
> seen, but so far I have not been successful. Is there an example out
> there that will show me what I need to code using CURL? I have found
> parts in different examples, but not one that does all that I need to do.
>
>

Please be more specific. What examples are you working from? Do you get
an error? Can you give us verbose output? Enable verbosity, also show
the libcurl version your program is using:

printf("\n\n\nYou are using libcurl/%s\n\n\n",
curl_version_info(CURLVERSION_NOW)->version);
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);

There is a simple POST example in docs/examples/http-post.c [1].

[1]: http://curl.haxx.se/libcurl/c/http-post.html

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-06-18