curl/docs/examples
Daniel Stenberg 1026b36ea0
examples/multi-single: fix scan-build warning
warning: Value stored to 'mc' during its initialization is never read

Follow-up to ae8e11ed5f

Closes #7360
2021-07-07 13:06:18 +02:00
..
.checksrc
.gitignore
10-at-a-time.c
adddocsref.pl
altsvc.c
anyauthput.c
cacertinmem.c
certinfo.c
chkspeed.c
cookie_interface.c
crawler.c
curlgtk.c examples/curlgtk.c: fix the copyright year range 2020-12-30 22:37:44 +01:00
curlx.c copyright: update copyright year ranges to 2021 2021-05-26 08:18:11 +02:00
debug.c
ephiperfifo.c
evhiperfifo.c
externalsocket.c tidy-up: make conditional checks more consistent 2021-04-22 09:10:17 +02:00
fileupload.c
fopen.c tidy-up: make conditional checks more consistent 2021-04-22 09:10:17 +02:00
ftp-wildcard.c
ftpget.c
ftpgetinfo.c
ftpgetresp.c
ftpsget.c
ftpupload.c
ftpuploadfrommem.c
ftpuploadresume.c
getinfo.c
getinmemory.c tidy-up: make conditional checks more consistent 2021-04-22 09:10:17 +02:00
getredirect.c
getreferrer.c http: add new files missed from referrer commit 2021-02-19 16:18:15 +00:00
ghiper.c
hiperfifo.c misc: update copyright year ranges to match latest updates 2021-04-13 14:32:30 +02:00
href_extractor.c
htmltidy.c
htmltitle.cpp
http2-download.c docs/examples: use curl_multi_poll() in multi examples 2021-07-07 08:15:09 +02:00
http2-pushinmemory.c
http2-serverpush.c docs/examples: use curl_multi_poll() in multi examples 2021-07-07 08:15:09 +02:00
http2-upload.c docs/examples: use curl_multi_poll() in multi examples 2021-07-07 08:15:09 +02:00
http3-present.c
http3.c
http-post.c
httpcustomheader.c
httpput-postfields.c
httpput.c
https.c
imap-append.c examples: safer and more proper read callback logic 2021-07-01 14:27:12 +02:00
imap-authzid.c
imap-copy.c
imap-create.c
imap-delete.c
imap-examine.c
imap-fetch.c
imap-list.c
imap-lsub.c
imap-multi.c docs/examples: use curl_multi_poll() in multi examples 2021-07-07 08:15:09 +02:00
imap-noop.c
imap-search.c
imap-ssl.c
imap-store.c
imap-tls.c
Makefile.am
makefile.dj
Makefile.example
Makefile.inc docs/examples: use curl_multi_poll() in multi examples 2021-07-07 08:15:09 +02:00
Makefile.m32 metalink: remove 2021-06-07 08:14:25 +02:00
Makefile.netware
multi-app.c docs/examples: use curl_multi_poll() in multi examples 2021-07-07 08:15:09 +02:00
multi-debugcallback.c docs/examples: use curl_multi_poll() in multi examples 2021-07-07 08:15:09 +02:00
multi-double.c docs/examples: use curl_multi_poll() in multi examples 2021-07-07 08:15:09 +02:00
multi-event.c
multi-formadd.c docs/examples: use curl_multi_poll() in multi examples 2021-07-07 08:15:09 +02:00
multi-legacy.c docs/examples: use curl_multi_poll() in multi examples 2021-07-07 08:15:09 +02:00
multi-post.c docs/examples: use curl_multi_poll() in multi examples 2021-07-07 08:15:09 +02:00
multi-single.c examples/multi-single: fix scan-build warning 2021-07-07 13:06:18 +02:00
multi-uv.c
multithread.c
opensslthreadlock.c
parseurl.c
persistent.c
pop3-authzid.c
pop3-dele.c
pop3-list.c
pop3-multi.c docs/examples: use curl_multi_poll() in multi examples 2021-07-07 08:15:09 +02:00
pop3-noop.c
pop3-retr.c
pop3-ssl.c
pop3-stat.c
pop3-tls.c
pop3-top.c
pop3-uidl.c
post-callback.c
postinmemory.c
postit2-formadd.c
postit2.c
progressfunc.c
README.md
resolve.c
rtsp.c examples: length-limit two sscanf() uses of %s 2021-06-24 15:57:09 +02:00
sampleconv.c
sendrecv.c
sepheaders.c
sessioninfo.c
sftpget.c
sftpuploadresume.c
shared-connection-cache.c
simple.c
simplepost.c
simplessl.c
smooth-gtk-thread.c
smtp-authzid.c examples: safer and more proper read callback logic 2021-07-01 14:27:12 +02:00
smtp-expn.c
smtp-mail.c examples: safer and more proper read callback logic 2021-07-01 14:27:12 +02:00
smtp-mime.c
smtp-multi.c docs/examples: use curl_multi_poll() in multi examples 2021-07-07 08:15:09 +02:00
smtp-ssl.c examples: safer and more proper read callback logic 2021-07-01 14:27:12 +02:00
smtp-tls.c examples: safer and more proper read callback logic 2021-07-01 14:27:12 +02:00
smtp-vrfy.c
sslbackend.c
synctime.c examples: length-limit two sscanf() uses of %s 2021-06-24 15:57:09 +02:00
threaded-ssl.c
url2file.c
urlapi.c
usercertinmem.c tidy-up: make conditional checks more consistent 2021-04-22 09:10:17 +02:00
version-check.pl
xmlstream.c

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 don't 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 doesn't 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.