diff options
author | Daniel Stenberg <daniel@haxx.se> | 2014-10-21 10:26:40 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2014-10-21 10:26:40 +0200 |
commit | 7b82b07fba1a339aecbf85256c759682db6379d6 (patch) | |
tree | 5422877f8519767f80f5da4b7dd68739a7a37081 /docs/libcurl/opts/CURLOPT_ERRORBUFFER.3 | |
parent | c857bb68ec37f82b62238fca73942e6ede8bd8f7 (diff) |
docs: edited lots of libcurl docs for clarity
Diffstat (limited to 'docs/libcurl/opts/CURLOPT_ERRORBUFFER.3')
-rw-r--r-- | docs/libcurl/opts/CURLOPT_ERRORBUFFER.3 | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/docs/libcurl/opts/CURLOPT_ERRORBUFFER.3 b/docs/libcurl/opts/CURLOPT_ERRORBUFFER.3 index d74372376..577202cfc 100644 --- a/docs/libcurl/opts/CURLOPT_ERRORBUFFER.3 +++ b/docs/libcurl/opts/CURLOPT_ERRORBUFFER.3 @@ -48,10 +48,25 @@ NULL .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +curl = curl_easy_init(); +if(curl) { + char error[CURL_ERROR_SIZE] + + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); + + /* provide a buffer to store errors in */ + curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, error); + + /* Perform the request */ + curl_easy_perform(curl); +} +.fi .SH AVAILABILITY Always .SH RETURN VALUE Returns CURLE_OK .SH "SEE ALSO" .BR CURLOPT_DEBUGFUNCTION "(3), " CURLOPT_VERBOSE "(3), " +.BR curl_easy_strerror "(3), " curl_multi_strerror "(3), " +.BR curl_share_strerror "(3) " |