summaryrefslogtreecommitdiff
path: root/docs/libcurl/curl_easy_perform.3
diff options
context:
space:
mode:
authorAlessandro Ghedini <alessandro@ghedini.me>2015-04-22 10:25:34 +0200
committerAlessandro Ghedini <alessandro@ghedini.me>2015-04-22 10:25:34 +0200
commit7b1fa5a0c5daf3831b9857c8fa678aaa6679d618 (patch)
treefd89ac2d30f1dcf60c769ec994177e1ae09fa3fa /docs/libcurl/curl_easy_perform.3
parenta8501fab9f2f579a6951c1cfcbc8f60b3d39af7f (diff)
Imported Upstream version 7.42.0
Diffstat (limited to 'docs/libcurl/curl_easy_perform.3')
-rw-r--r--docs/libcurl/curl_easy_perform.314
1 files changed, 12 insertions, 2 deletions
diff --git a/docs/libcurl/curl_easy_perform.3 b/docs/libcurl/curl_easy_perform.3
index 52830151..fc8c59e5 100644
--- a/docs/libcurl/curl_easy_perform.3
+++ b/docs/libcurl/curl_easy_perform.3
@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
@@ -21,7 +21,7 @@
.\" **************************************************************************
.TH curl_easy_perform 3 "5 Mar 2001" "libcurl 7.7" "libcurl Manual"
.SH NAME
-curl_easy_perform - Perform a file transfer
+curl_easy_perform - perform a blocking file transfer
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
@@ -58,6 +58,16 @@ CURLE_OK (0) means everything was ok, non-zero means an error occurred as
defines - see \fIlibcurl-errors(3)\fP. If the \fBCURLOPT_ERRORBUFFER(3)\fP was
set with \fIcurl_easy_setopt(3)\fP there will be a readable error message in
the error buffer when non-zero is returned.
+.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_setopt "(3), "
.BR curl_multi_add_handle "(3), " curl_multi_perform "(3), "