First you create an “easy handle”, which is your handle to a transfer, really:
Then you set various options in that handle to control the upcoming transfer.
Like, this example sets the URL:
Read more on in its separate section.
All options are “sticky”. They remain set in the handle until you change them
again, or call on the handle.
The actual “perform the transfer phase” can be done using different
means and function calls, depending on what kind of behavior you want in your
application and how libcurl is best integrated into your architecture. Those
are further described later in this chapter.
After the transfer has completed, you can figure out if it succeeded or not
and you can extract stats and various information that libcurl gathered during
the transfer from the easy handle. See Post transfer
information.
Easy handles are meant and designed to be reused. When you have done a single
transfer with the easy handle, you can immediately use it again for your next
transfer. There are lots of gains to be had by this.