James Fuller 97394caa20 example/maxconnects: set maxconnect example 1 rok pred
..
.checksrc 2f72ad44fc checksrc: ban gmtime/localtime 4 rokov pred
.gitignore 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
10-at-a-time.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
Makefile.am 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
Makefile.example 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
Makefile.inc 97394caa20 example/maxconnects: set maxconnect example 1 rok pred
Makefile.mk 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
README.md 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
adddocsref.pl 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
altsvc.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
anyauthput.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
cacertinmem.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
certinfo.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
chkspeed.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
connect-to.c 67ebc0d5b0 example/connect-to: show CURLOPT_CONNECT_TO 1 rok pred
cookie_interface.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
crawler.c aef74ae416 example/crawler: make it use a few more options 1 rok pred
debug.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
default-scheme.c c6ec264d1f example/default-scheme: set the default scheme for schemeless URLs 1 rok pred
ephiperfifo.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
evhiperfifo.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
externalsocket.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
fileupload.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
ftp-wildcard.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
ftpget.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
ftpgetinfo.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
ftpgetresp.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
ftpsget.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
ftpupload.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
ftpuploadfrommem.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
ftpuploadresume.c 67e9e90f96 examples/ftpuploadresume.c: add use of CURLOPT_ACCEPTTIMEOUT_MS 1 rok pred
getinfo.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
getinmemory.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
getredirect.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
getreferrer.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
ghiper.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
headerapi.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
hiperfifo.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
href_extractor.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
hsts-preload.c e6ad624996 example/hsts-preload: show one way to HSTS preload 1 rok pred
htmltidy.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
htmltitle.cpp 127eb0d83a misc: fix spelling mistakes 1 rok pred
http-options.c 4e6a07e177 examples/http-options: show how to send "OPTIONS *" 1 rok pred
http-post.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
http2-download.c ad8a8e048e example/http2-download: set CURLOPT_BUFFERSIZE 1 rok pred
http2-pushinmemory.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
http2-serverpush.c acd82c8bfd tests/http: more tests with specific clients 1 rok pred
http2-upload.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
http3-present.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
http3.c 49a9f13c39 examples/http3.c: use CURL_HTTP_VERSION_3 1 rok pred
httpcustomheader.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
httpput-postfields.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
httpput.c 127eb0d83a misc: fix spelling mistakes 1 rok pred
https.c 555bacd6d5 examples/https.c: use CURLOPT_CA_CACHE_TIMEOUT 1 rok pred
imap-append.c 22c92a6d51 docs: use a space after RFC when spelling out RFC numbers 1 rok pred
imap-authzid.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
imap-copy.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
imap-create.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
imap-delete.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
imap-examine.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
imap-fetch.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
imap-list.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
imap-lsub.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
imap-multi.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
imap-noop.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
imap-search.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
imap-ssl.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
imap-store.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
imap-tls.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
ipv6.c fdfc2bb6be examples/ipv6: disable on win32 1 rok pred
maxconnects.c 97394caa20 example/maxconnects: set maxconnect example 1 rok pred
multi-app.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
multi-debugcallback.c b5351c71c1 examples/multi-debugcallback.c: avoid the bool typedef 1 rok pred
multi-double.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
multi-event.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
multi-formadd.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
multi-legacy.c 6f93d5f604 lib: fix conversion warnings with gcc on macOS 1 rok pred
multi-post.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
multi-single.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
multi-uv.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
multithread.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
parseurl.c f198d33e8d checksrc: disallow spaces before labels 1 rok pred
persistent.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
pop3-authzid.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
pop3-dele.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
pop3-list.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
pop3-multi.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
pop3-noop.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
pop3-retr.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
pop3-ssl.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
pop3-stat.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
pop3-tls.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
pop3-top.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
pop3-uidl.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
post-callback.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
postinmemory.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
postit2-formadd.c 22c92a6d51 docs: use a space after RFC when spelling out RFC numbers 1 rok pred
postit2.c 22c92a6d51 docs: use a space after RFC when spelling out RFC numbers 1 rok pred
progressfunc.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
protofeats.c c9cff9262f docs/examples/protofeats.c: Outputs all protocols and features 1 rok pred
resolve.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
sendrecv.c 6f93d5f604 lib: fix conversion warnings with gcc on macOS 1 rok pred
sepheaders.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
sessioninfo.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
sftpget.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
sftpuploadresume.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
shared-connection-cache.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
simple.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
simplepost.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
simplessl.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
smooth-gtk-thread.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
smtp-authzid.c 22c92a6d51 docs: use a space after RFC when spelling out RFC numbers 1 rok pred
smtp-expn.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
smtp-mail.c 22c92a6d51 docs: use a space after RFC when spelling out RFC numbers 1 rok pred
smtp-mime.c b39181cedc examples/smtp-mime: use CURLOPT_MAIL_RCPT_ALLOWFAILS 1 rok pred
smtp-multi.c 22c92a6d51 docs: use a space after RFC when spelling out RFC numbers 1 rok pred
smtp-ssl.c 22c92a6d51 docs: use a space after RFC when spelling out RFC numbers 1 rok pred
smtp-tls.c 22c92a6d51 docs: use a space after RFC when spelling out RFC numbers 1 rok pred
smtp-vrfy.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
sslbackend.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
synctime.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
threaded-ssl.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
unixsocket.c 4894ca6813 examples/unixsocket.c: example using CURLOPT_UNIX_SOCKET_PATH 1 rok pred
url2file.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
urlapi.c 741b6853b9 examples: make use of CURLOPT_(REDIR_|)PROTOCOLS_STR 1 rok pred
usercertinmem.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
version-check.pl 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred
websocket-cb.c 78886afb50 ws: make the curl_ws_meta() return pointer a const 1 rok pred
websocket.c 78886afb50 ws: make the curl_ws_meta() return pointer a const 1 rok pred
xmlstream.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok pred

README.md

libcurl examples

This directory is for libcurl programming examples. They are meant to show some simple steps on how you can build your own application to take full advantage of libcurl.

If you end up with other small but still useful example sources, please mail them for submission in future packages and on the website.

Building

The Makefile.example is an example Makefile that could be used to build these examples. Just edit the file according to your system and requirements first.

Most examples should build fine using a command line like this:

`curl-config --cc --cflags --libs` -o example example.c

Some compilers do not like having the arguments in this order but instead want you do reorganize them like:

`curl-config --cc` -o example example.c `curl-config --cflags --libs`

Please do not use the curl.se site as a test target for your libcurl applications/experiments. Even if some of the examples use that site as a URL at some places, it does not mean that the URLs work or that we expect you to actually torture our website with your tests. Thanks.

Examples

Each example source code file is designed to be and work stand-alone and rather self-explanatory. The examples may at times lack the level of error checks you need in a real world, but that is then only for the sake of readability: to make the code smaller and easier to follow.