Imported Upstream version 7.40.0
[platform/upstream/curl.git] / docs / libcurl / libcurl-easy.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2  "http://www.w3.org/TR/html4/loose.dtd">
3 <html><head>
4 <title>libcurl man page</title>
5 <meta name="generator" content="roffit">
6 <STYLE type="text/css">
7 P.level0 {
8  padding-left: 2em;
9 }
10
11 P.level1 {
12  padding-left: 4em;
13 }
14
15 P.level2 {
16  padding-left: 6em;
17 }
18
19 span.emphasis {
20  font-style: italic;
21 }
22
23 span.bold {
24  font-weight: bold;
25 }
26
27 span.manpage {
28  font-weight: bold;
29 }
30
31 h2.nroffsh {
32  background-color: #e0e0e0;
33 }
34
35 span.nroffip {
36  font-weight: bold;
37  font-size: 120%;
38  font-family: monospace;
39 }
40
41 p.roffit {
42  text-align: center;
43  font-size: 80%;
44 }
45 </STYLE>
46 </head><body>
47
48 <p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
49 <p class="level0">libcurl-easy - easy interface overview <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
50 <p class="level0">When using libcurl's "easy" interface you init your session and get a handle (often referred to as an "easy handle"), which you use as input to the easy interface functions you use. Use <a Class="emphasis" href="./curl_easy_init.html">curl_easy_init</a> to get the handle. 
51 <p class="level0">You continue by setting all the options you want in the upcoming transfer, the most important among them is the URL itself (you can't transfer anything without a specified URL as you may have figured out yourself). You might want to set some callbacks as well that will be called from the library when data is available etc. <a Class="emphasis" href="./curl_easy_setopt.html">curl_easy_setopt</a> is used for all this. 
52 <p class="level0"><span Class="emphasis">CURLOPT_URL(3)</span> is only option you really must set, as otherwise there can be no transfer. Another commonly used option is <span Class="emphasis">CURLOPT_VERBOSE(3)</span> that will help you see what libcurl is doing under the hood, very useful when debugging for example. The <a Class="emphasis" href="./curl_easy_setopt.html">curl_easy_setopt</a> man page has a full index of the over 200 available options. 
53 <p class="level0">If you at any point would like to blank all previously set options for a single easy handle, you can call <a Class="emphasis" href="./curl_easy_reset.html">curl_easy_reset</a> and you can also make a clone of an easy handle (with all its set options) using <a Class="emphasis" href="./curl_easy_duphandle.html">curl_easy_duphandle</a>. 
54 <p class="level0">When all is setup, you tell libcurl to perform the transfer using <a Class="emphasis" href="./curl_easy_perform.html">curl_easy_perform</a>.  It will then do the entire operation and won't return until it is done (successfully or not). 
55 <p class="level0">After the transfer has been made, you can set new options and make another transfer, or if you're done, cleanup the session by calling <a Class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup</a>. If you want persistent connections, you don't cleanup immediately, but instead run ahead and perform other transfers using the same easy handle. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
56 <p class="level0"><a Class="manpage" href="./curl_easy_init.html">curl_easy_init</a>, <a Class="manpage" href="./curl_easy_cleanup.html">curl_easy_cleanup</a>, <a Class="manpage" href="./curl_easy_setopt.html">curl_easy_setopt</a>, <span Class="manpage"> </span> <a Class="manpage" href="./libcurl-errors.html">libcurl-errors</a>, <a Class="manpage" href="./libcurl-multi.html">libcurl-multi</a>, <a Class="manpage" href="./libcurl.html">libcurl</a>, <p class="roffit">
57  This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
58 </body></html>