opts: added examples
This commit is contained in:
@@ -272,12 +272,23 @@ performed.
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
|
||||
|
||||
curl_easy_perform(curl);
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
POP3 and SMTP added in 7.31.0
|
||||
POP3 and SMTP were added in 7.31.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK on success or
|
||||
CURLE_OUT_OF_MEMORY if there was insufficient heap space.
|
||||
Returns CURLE_OK on success or CURLE_OUT_OF_MEMORY if there was insufficient
|
||||
heap space.
|
||||
|
||||
Note that \fIcurl_easy_setopt(3)\fP won't actually parse the given string so
|
||||
given a bad URL, it will not be detected until \fIcurl_easy_perform(3)\fP or
|
||||
similar is called.
|
||||
.SH "SEE ALSO"
|
||||
.BR CURLOPT_VERBOSE "(3), " CURLOPT_PROTOCOLS "(3), "
|
||||
.BR CURLOPT_FORBID_REUSE "(3), " CURLOPT_FRESH_CONNECT "(3), "
|
||||
.BR curl_easy_perform "(3)"
|
||||
|
||||
Reference in New Issue
Block a user