libcurl - C API
来源:百度文库 编辑:神马文学网 时间:2024/04/30 08:27:02
Using The libcurl C Interface
There's the tutorial to start with, readthe tutorial to get a general in-depth grip of what libcurl programming is all about.
There are someexample C source codes you can check out. They're not all-covering or even very extensive, but they might serve as a source of inspiration to start hacking.
Windows developers using the Microsoft Visual Studio, might enjoy Rosso Salmanzadeh's excellentUsing libcurl in Visual Studio [PDF] guide.Easy or Multi
The easy interface is a synchronous, efficient, quickly used and... yes, easy interface for file transfers. Numerous applications have been built using this.
The multi interface is the asynchronous brother in the family and it also offers multiple transfers using a single thread and more. Get a grip of how to work with it inthe multi interface overview.The Easy interface
When using libcurl youinit your easy-session and get a handle, which you use as input to the following interface functions you use.
You continue by setting all theoptions you want in the upcoming transfer, most important among them is the URL itself. You might want to set some callbacks as well that will be called from the library when data is available etc.
When all is setup, you tell libcurl toperform the transfer. It will then do the entire operation and won't return until it is done or failed.
After the performance is made, you mayget information about the transfer and then youcleanup the easy-session's handle and libcurl is entire off the hook!
See also theeasy interface overview.
curl_easy_init()
curl_easy_cleanup()
curl_easy_setopt()
curl_easy_perform()
curl_easy_getinfo()
While the above functions are the main functions to use in the easy interface, there is a series of other helpful functions too including:
curl_version() returns a pointer to the libcurl version string
curl_getdate() converts a date string to time_t
curl_formadd() build multipart form-data posts
curl_formfree() free a previously built form POST
curl_slist_append() builds a linked list
curl_slist_free_all() frees a whole curl_slist as made with curl_slist_append()
curl_easy_escape() URL encodes a string
curl_easy_unescape() URL decodes a string
All man pages are included in every release archive, in three different formats: man page, HTML and pdf.
There's the tutorial to start with, readthe tutorial to get a general in-depth grip of what libcurl programming is all about.
There are someexample C source codes you can check out. They're not all-covering or even very extensive, but they might serve as a source of inspiration to start hacking.
Windows developers using the Microsoft Visual Studio, might enjoy Rosso Salmanzadeh's excellentUsing libcurl in Visual Studio [PDF] guide.Easy or Multi
The easy interface is a synchronous, efficient, quickly used and... yes, easy interface for file transfers. Numerous applications have been built using this.
The multi interface is the asynchronous brother in the family and it also offers multiple transfers using a single thread and more. Get a grip of how to work with it inthe multi interface overview.The Easy interface
When using libcurl youinit your easy-session and get a handle, which you use as input to the following interface functions you use.
You continue by setting all theoptions you want in the upcoming transfer, most important among them is the URL itself. You might want to set some callbacks as well that will be called from the library when data is available etc.
When all is setup, you tell libcurl toperform the transfer. It will then do the entire operation and won't return until it is done or failed.
After the performance is made, you mayget information about the transfer and then youcleanup the easy-session's handle and libcurl is entire off the hook!
See also theeasy interface overview.
curl_easy_init()
curl_easy_cleanup()
curl_easy_setopt()
curl_easy_perform()
curl_easy_getinfo()
While the above functions are the main functions to use in the easy interface, there is a series of other helpful functions too including:
curl_version() returns a pointer to the libcurl version string
curl_getdate() converts a date string to time_t
curl_formadd() build multipart form-data posts
curl_formfree() free a previously built form POST
curl_slist_append() builds a linked list
curl_slist_free_all() frees a whole curl_slist as made with curl_slist_append()
curl_easy_escape() URL encodes a string
curl_easy_unescape() URL decodes a string
All man pages are included in every release archive, in three different formats: man page, HTML and pdf.
libcurl - C API
libcurl
API
SWIG,把C/C API 导出成Java,C#,Python,Ruby,Php的类库...
libcurl - the multiprotocol file transfer lib...
Twitter和开放API 开放的心态不会失去市场_站长茶馆_中国站长站 CHINAZ.C...
什么是API
WINDOWS API
迅雷API
API测试
如何实现api钩子
浅谈api hook技术
Java XML API 漫谈
搜职网开放API接口
什么是Windows API
BREW 3.0 API 參考資料簡介
Java Transaction API概述
浅析本机API
JFreeChart中文API
Java API Design Guidelines
Servlet API中文帮助
Basic JMS API Concepts
Google中国地图API应用
Java NIO API详解