tree: 3653768b6fbdc03b74c345ba1b183260b3b3f600 [path history] [tgz]
  1. .checksrc
  2. .gitignore
  3. 10-at-a-time.c
  4. adddocsref.pl
  5. address-scope.c
  6. altsvc.c
  7. anyauthput.c
  8. cacertinmem.c
  9. certinfo.c
  10. chkspeed.c
  11. connect-to.c
  12. cookie_interface.c
  13. crawler.c
  14. debug.c
  15. default-scheme.c
  16. ephiperfifo.c
  17. evhiperfifo.c
  18. externalsocket.c
  19. fileupload.c
  20. ftp-wildcard.c
  21. ftpget.c
  22. ftpgetinfo.c
  23. ftpgetresp.c
  24. ftpsget.c
  25. ftpupload.c
  26. ftpuploadfrommem.c
  27. ftpuploadresume.c
  28. getinfo.c
  29. getinmemory.c
  30. getredirect.c
  31. getreferrer.c
  32. ghiper.c
  33. headerapi.c
  34. hiperfifo.c
  35. href_extractor.c
  36. hsts-preload.c
  37. htmltidy.c
  38. htmltitle.cpp
  39. http-options.c
  40. http-post.c
  41. http2-download.c
  42. http2-pushinmemory.c
  43. http2-serverpush.c
  44. http2-upload.c
  45. http3-present.c
  46. http3.c
  47. httpcustomheader.c
  48. httpput-postfields.c
  49. httpput.c
  50. https.c
  51. imap-append.c
  52. imap-authzid.c
  53. imap-copy.c
  54. imap-create.c
  55. imap-delete.c
  56. imap-examine.c
  57. imap-fetch.c
  58. imap-list.c
  59. imap-lsub.c
  60. imap-multi.c
  61. imap-noop.c
  62. imap-search.c
  63. imap-ssl.c
  64. imap-store.c
  65. imap-tls.c
  66. interface.c
  67. ipv6.c
  68. keepalive.c
  69. localport.c
  70. Makefile.am
  71. Makefile.example
  72. Makefile.inc
  73. Makefile.mk
  74. maxconnects.c
  75. multi-app.c
  76. multi-debugcallback.c
  77. multi-double.c
  78. multi-event.c
  79. multi-formadd.c
  80. multi-legacy.c
  81. multi-post.c
  82. multi-single.c
  83. multi-uv.c
  84. multithread.c
  85. netrc.c
  86. parseurl.c
  87. persistent.c
  88. pop3-authzid.c
  89. pop3-dele.c
  90. pop3-list.c
  91. pop3-multi.c
  92. pop3-noop.c
  93. pop3-retr.c
  94. pop3-ssl.c
  95. pop3-stat.c
  96. pop3-tls.c
  97. pop3-top.c
  98. pop3-uidl.c
  99. post-callback.c
  100. postinmemory.c
  101. postit2-formadd.c
  102. postit2.c
  103. progressfunc.c
  104. protofeats.c
  105. range.c
  106. README.md
  107. resolve.c
  108. rtsp-options.c
  109. sendrecv.c
  110. sepheaders.c
  111. sessioninfo.c
  112. sftpget.c
  113. sftpuploadresume.c
  114. shared-connection-cache.c
  115. simple.c
  116. simplepost.c
  117. simplessl.c
  118. smooth-gtk-thread.c
  119. smtp-authzid.c
  120. smtp-expn.c
  121. smtp-mail.c
  122. smtp-mime.c
  123. smtp-multi.c
  124. smtp-ssl.c
  125. smtp-tls.c
  126. smtp-vrfy.c
  127. sslbackend.c
  128. synctime.c
  129. threaded-ssl.c
  130. unixsocket.c
  131. url2file.c
  132. urlapi.c
  133. usercertinmem.c
  134. version-check.pl
  135. websocket-cb.c
  136. websocket.c
  137. xmlstream.c
docs/examples/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.