113498266Sopenharmony_ci<!--
213498266Sopenharmony_ciCopyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
313498266Sopenharmony_ci
413498266Sopenharmony_ciSPDX-License-Identifier: curl
513498266Sopenharmony_ci-->
613498266Sopenharmony_ci
713498266Sopenharmony_ci# libcurl examples
813498266Sopenharmony_ci
913498266Sopenharmony_ciThis directory is for libcurl programming examples. They are meant to show
1013498266Sopenharmony_cisome simple steps on how you can build your own application to take full
1113498266Sopenharmony_ciadvantage of libcurl.
1213498266Sopenharmony_ci
1313498266Sopenharmony_ciIf you end up with other small but still useful example sources, please mail
1413498266Sopenharmony_cithem for submission in future packages and on the website.
1513498266Sopenharmony_ci
1613498266Sopenharmony_ci## Building
1713498266Sopenharmony_ci
1813498266Sopenharmony_ciThe `Makefile.example` is an example Makefile that could be used to build
1913498266Sopenharmony_cithese examples. Just edit the file according to your system and requirements
2013498266Sopenharmony_cifirst.
2113498266Sopenharmony_ci
2213498266Sopenharmony_ciMost examples should build fine using a command line like this:
2313498266Sopenharmony_ci
2413498266Sopenharmony_ci    `curl-config --cc --cflags --libs` -o example example.c
2513498266Sopenharmony_ci
2613498266Sopenharmony_ciSome compilers do not like having the arguments in this order but instead
2713498266Sopenharmony_ciwant you do reorganize them like:
2813498266Sopenharmony_ci
2913498266Sopenharmony_ci    `curl-config --cc` -o example example.c `curl-config --cflags --libs`
3013498266Sopenharmony_ci
3113498266Sopenharmony_ci**Please** do not use the `curl.se` site as a test target for your libcurl
3213498266Sopenharmony_ciapplications/experiments. Even if some of the examples use that site as a URL
3313498266Sopenharmony_ciat some places, it does not mean that the URLs work or that we expect you to
3413498266Sopenharmony_ciactually torture our website with your tests. Thanks.
3513498266Sopenharmony_ci
3613498266Sopenharmony_ci## Examples
3713498266Sopenharmony_ci
3813498266Sopenharmony_ciEach example source code file is designed to be and work stand-alone and
3913498266Sopenharmony_cirather self-explanatory. The examples may at times lack the level of error
4013498266Sopenharmony_cichecks you need in a real world, but that is then only for the sake of
4113498266Sopenharmony_cireadability: to make the code smaller and easier to follow.
42