1

since the libcurl examples did not help me very much I ask it here:

How can I send a POST-request to a server using libcurl, without sending some form data but some other text that does not come from an web form. Next when this happened successfully, where/how can I read the data sent back from the server? In my case these data are again a bunch of ASCII-text that in no way is related to any HTML web form.

libcurl only provides an example that can be uset to set web for mdata and where the result is not read.

Thanks!

Elmi
  • 5,899
  • 15
  • 72
  • 143
  • libcurl provides lots of docs and examples showing how this is done, can you please show us what you've done and what doesn't work? – Daniel Stenberg May 08 '14 at 07:36
  • @Daniel Stenberg: I'm referring to the *only* POST-example at http://curl.haxx.se/libcurl/c/postit2.html , there it is shown how to set form parameters consisting of identifier and related value but I can't find an example somewhere where just some plain POST-data are attached in the body of the request (without this name/value assignment like it is done by curl_formadd()) – Elmi May 08 '14 at 11:22
  • See http://curl.haxx.se/libcurl/c/simplepost.html – Daniel Stenberg May 08 '14 at 11:44

1 Answers1

1

See simplepost on the curl web site.

Daniel Stenberg
  • 54,736
  • 17
  • 146
  • 222