diff options
author | Daniel Stenberg <daniel@haxx.se> | 2014-11-25 14:25:02 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2014-11-25 14:25:02 +0100 |
commit | 0beda1a388faac8277ffa975629a58587a3b5264 (patch) | |
tree | c3e5e04691c7802df35a7f5374d29d523ef18747 /docs/libcurl/curl_easy_setopt.3 | |
parent | 7eb7f7c32dd4eab243963b694159add04016f617 (diff) |
curl*3: added small examples
and some minor edits
Diffstat (limited to 'docs/libcurl/curl_easy_setopt.3')
-rw-r--r-- | docs/libcurl/curl_easy_setopt.3 | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/libcurl/curl_easy_setopt.3 b/docs/libcurl/curl_easy_setopt.3 index 5032ce226..d79a42b04 100644 --- a/docs/libcurl/curl_easy_setopt.3 +++ b/docs/libcurl/curl_easy_setopt.3 @@ -499,6 +499,16 @@ the library is too old to support it or the option was removed in a recent version, this function will return \fICURLE_UNKNOWN_OPTION\fP. If support for the option was disabled at compile-time, it will return \fICURLE_NOT_BUILT_IN\fP. +.SH EXAMPLE +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode res; + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); + res = curl_easy_perform(curl); + curl_easy_cleanup(curl); +}} +.fi .SH "SEE ALSO" .BR curl_easy_init "(3), " curl_easy_cleanup "(3), " curl_easy_reset "(3), " .BR curl_multi_setopt "(3), " |