CINXE.COM
Exit code - everything curl
<!DOCTYPE HTML> <html lang="en" class="light" dir="ltr"> <head> <!-- Book generated using mdBook --> <meta charset="UTF-8"> <title>Exit code - everything curl</title> <!-- Custom HTML head --> <meta name="description" content="everything there is to know about curl, libcurl and the cURL project"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#ffffff"> <link rel="icon" href="../favicon.svg"> <link rel="shortcut icon" href="../favicon.png"> <link rel="stylesheet" href="../css/variables.css"> <link rel="stylesheet" href="../css/general.css"> <link rel="stylesheet" href="../css/chrome.css"> <link rel="stylesheet" href="../css/print.css" media="print"> <!-- Fonts --> <link rel="stylesheet" href="../FontAwesome/css/font-awesome.css"> <link rel="stylesheet" href="../fonts/fonts.css"> <!-- Highlight.js Stylesheets --> <link rel="stylesheet" href="../highlight.css"> <link rel="stylesheet" href="../tomorrow-night.css"> <link rel="stylesheet" href="../ayu-highlight.css"> <!-- Custom theme stylesheets --> </head> <body class="sidebar-visible no-js"> <div id="body-container"> <!-- Provide site root to javascript --> <script> var path_to_root = "../"; var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light"; </script> <!-- Work around some values being stored in localStorage wrapped in quotes --> <script> try { var theme = localStorage.getItem('mdbook-theme'); var sidebar = localStorage.getItem('mdbook-sidebar'); if (theme.startsWith('"') && theme.endsWith('"')) { localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1)); } if (sidebar.startsWith('"') && sidebar.endsWith('"')) { localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1)); } } catch (e) { } </script> <!-- Set the theme before any content is loaded, prevents flash --> <script> var theme; try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } if (theme === null || theme === undefined) { theme = default_theme; } var html = document.querySelector('html'); html.classList.remove('light') html.classList.add(theme); var body = document.querySelector('body'); body.classList.remove('no-js') body.classList.add('js'); </script> <input type="checkbox" id="sidebar-toggle-anchor" class="hidden"> <!-- Hide / unhide sidebar before it is displayed --> <script> var body = document.querySelector('body'); var sidebar = null; var sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); if (document.body.clientWidth >= 1080) { try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { } sidebar = sidebar || 'visible'; } else { sidebar = 'hidden'; } sidebar_toggle.checked = sidebar === 'visible'; body.classList.remove('sidebar-visible'); body.classList.add("sidebar-" + sidebar); </script> <nav id="sidebar" class="sidebar" aria-label="Table of contents"> <div class="sidebar-scrollbox"> <ol class="chapter"><li class="chapter-item "><a href="../index.html"><strong aria-hidden="true">1.</strong> Everything curl</a></li><li class="chapter-item "><a href="../how-to-read.html"><strong aria-hidden="true">2.</strong> How to read</a></li><li class="chapter-item "><a href="../project/index.html"><strong aria-hidden="true">3.</strong> The cURL project</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="../project/started.html"><strong aria-hidden="true">3.1.</strong> How it started</a></li><li class="chapter-item "><a href="../project/name.html"><strong aria-hidden="true">3.2.</strong> The name</a></li><li class="chapter-item "><a href="../project/does.html"><strong aria-hidden="true">3.3.</strong> What does curl do?</a></li><li class="chapter-item "><a href="../project/comm.html"><strong aria-hidden="true">3.4.</strong> Project communication</a></li><li class="chapter-item "><a href="../project/etiquette.html"><strong aria-hidden="true">3.5.</strong> Mailing list etiquette</a></li><li class="chapter-item "><a href="../project/maillists.html"><strong aria-hidden="true">3.6.</strong> Mailing lists</a></li><li class="chapter-item "><a href="../project/bugs.html"><strong aria-hidden="true">3.7.</strong> Reporting bugs</a></li><li class="chapter-item "><a href="../project/support.html"><strong aria-hidden="true">3.8.</strong> Commercial support</a></li><li class="chapter-item "><a href="../project/releases.html"><strong aria-hidden="true">3.9.</strong> Releases</a></li><li class="chapter-item "><a href="../project/security.html"><strong aria-hidden="true">3.10.</strong> Security</a></li><li class="chapter-item "><a href="../project/trust.html"><strong aria-hidden="true">3.11.</strong> Trust</a></li><li class="chapter-item "><a href="../project/coc.html"><strong aria-hidden="true">3.12.</strong> Code of Conduct</a></li><li class="chapter-item "><a href="../project/devel.html"><strong aria-hidden="true">3.13.</strong> Development</a></li><li class="chapter-item "><a href="../project/devteam.html"><strong aria-hidden="true">3.14.</strong> The development team</a></li><li class="chapter-item "><a href="../project/users.html"><strong aria-hidden="true">3.15.</strong> Users of curl</a></li><li class="chapter-item "><a href="../project/future.html"><strong aria-hidden="true">3.16.</strong> Future</a></li></ol></li><li class="chapter-item "><a href="../protocols/index.html"><strong aria-hidden="true">4.</strong> Network and protocols</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="../protocols/network.html"><strong aria-hidden="true">4.1.</strong> Networking simplified</a></li><li class="chapter-item "><a href="../protocols/protocols.html"><strong aria-hidden="true">4.2.</strong> Protocols</a></li><li class="chapter-item "><a href="../protocols/curl.html"><strong aria-hidden="true">4.3.</strong> curl protocols</a></li><li class="chapter-item "><a href="../protocols/http.html"><strong aria-hidden="true">4.4.</strong> HTTP basics</a></li></ol></li><li class="chapter-item "><a href="../install/index.html"><strong aria-hidden="true">5.</strong> Install curl and libcurl</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="../install/linux.html"><strong aria-hidden="true">5.1.</strong> Linux</a></li><li class="chapter-item "><a href="../install/windows/index.html"><strong aria-hidden="true">5.2.</strong> Windows</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="../install/windows/win-msys2.html"><strong aria-hidden="true">5.2.1.</strong> MSYS2</a></li><li class="chapter-item "><a href="../install/windows/win-vcpkg.html"><strong aria-hidden="true">5.2.2.</strong> vcpkg</a></li></ol></li><li class="chapter-item "><a href="../install/macos.html"><strong aria-hidden="true">5.3.</strong> macOS</a></li><li class="chapter-item "><a href="../install/container.html"><strong aria-hidden="true">5.4.</strong> Container</a></li></ol></li><li class="chapter-item "><a href="../source/index.html"><strong aria-hidden="true">6.</strong> Source code</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="../source/opensource/index.html"><strong aria-hidden="true">6.1.</strong> Open Source</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="../source/opensource/license.html"><strong aria-hidden="true">6.1.1.</strong> License</a></li><li class="chapter-item "><a href="../source/opensource/copyright.html"><strong aria-hidden="true">6.1.2.</strong> Copyright</a></li></ol></li><li class="chapter-item "><a href="../source/layout.html"><strong aria-hidden="true">6.2.</strong> Code layout</a></li><li class="chapter-item "><a href="../source/options.html"><strong aria-hidden="true">6.3.</strong> Handling build options</a></li><li class="chapter-item "><a href="../source/style.html"><strong aria-hidden="true">6.4.</strong> Code style</a></li><li class="chapter-item "><a href="../source/contributing.html"><strong aria-hidden="true">6.5.</strong> Contributing</a></li><li class="chapter-item "><a href="../source/reportvuln.html"><strong aria-hidden="true">6.6.</strong> Reporting vulnerabilities</a></li><li class="chapter-item "><a href="../source/web.html"><strong aria-hidden="true">6.7.</strong> Website</a></li></ol></li><li class="chapter-item "><a href="../build/index.html"><strong aria-hidden="true">7.</strong> Build curl and libcurl</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="../build/autotools.html"><strong aria-hidden="true">7.1.</strong> Autotools</a></li><li class="chapter-item "><a href="../build/cmake.html"><strong aria-hidden="true">7.2.</strong> CMake</a></li><li class="chapter-item "><a href="../build/separate.html"><strong aria-hidden="true">7.3.</strong> Separate install</a></li><li class="chapter-item "><a href="../build/windows.html"><strong aria-hidden="true">7.4.</strong> Windows</a></li><li class="chapter-item "><a href="../build/deps.html"><strong aria-hidden="true">7.5.</strong> Dependencies</a></li><li class="chapter-item "><a href="../build/tls.html"><strong aria-hidden="true">7.6.</strong> TLS libraries</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="../build/boringssl.html"><strong aria-hidden="true">7.6.1.</strong> BoringSSL</a></li></ol></li></ol></li><li class="chapter-item expanded "><a href="../cmdline/index.html"><strong aria-hidden="true">8.</strong> Command line concepts</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="../cmdline/differences.html"><strong aria-hidden="true">8.1.</strong> Differences</a></li><li class="chapter-item "><a href="../cmdline/options/index.html"><strong aria-hidden="true">8.2.</strong> Command line options</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="../cmdline/options/short.html"><strong aria-hidden="true">8.2.1.</strong> Short options</a></li><li class="chapter-item "><a href="../cmdline/options/long.html"><strong aria-hidden="true">8.2.2.</strong> Long options</a></li><li class="chapter-item "><a href="../cmdline/options/args.html"><strong aria-hidden="true">8.2.3.</strong> Arguments to options</a></li><li class="chapter-item "><a href="../cmdline/options/negative.html"><strong aria-hidden="true">8.2.4.</strong> Negative options</a></li></ol></li><li class="chapter-item "><a href="../cmdline/help.html"><strong aria-hidden="true">8.3.</strong> Help</a></li><li class="chapter-item "><a href="../cmdline/versions.html"><strong aria-hidden="true">8.4.</strong> Options depend on version</a></li><li class="chapter-item "><a href="../cmdline/urls/index.html"><strong aria-hidden="true">8.5.</strong> URLs</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="../cmdline/urls/scheme.html"><strong aria-hidden="true">8.5.1.</strong> Scheme</a></li><li class="chapter-item "><a href="../cmdline/urls/auth.html"><strong aria-hidden="true">8.5.2.</strong> Name and password</a></li><li class="chapter-item "><a href="../cmdline/urls/host.html"><strong aria-hidden="true">8.5.3.</strong> Host</a></li><li class="chapter-item "><a href="../cmdline/urls/port.html"><strong aria-hidden="true">8.5.4.</strong> Port number</a></li><li class="chapter-item "><a href="../cmdline/urls/path.html"><strong aria-hidden="true">8.5.5.</strong> Path</a></li><li class="chapter-item "><a href="../cmdline/urls/query.html"><strong aria-hidden="true">8.5.6.</strong> Query</a></li><li class="chapter-item "><a href="../cmdline/urls/ftptype.html"><strong aria-hidden="true">8.5.7.</strong> FTP type</a></li><li class="chapter-item "><a href="../cmdline/urls/fragment.html"><strong aria-hidden="true">8.5.8.</strong> Fragment</a></li><li class="chapter-item "><a href="../cmdline/urls/browsers.html"><strong aria-hidden="true">8.5.9.</strong> Browsers</a></li><li class="chapter-item "><a href="../cmdline/urls/options.html"><strong aria-hidden="true">8.5.10.</strong> Many options and URLs</a></li><li class="chapter-item "><a href="../cmdline/urls/globbing.html"><strong aria-hidden="true">8.5.11.</strong> URL globbing</a></li><li class="chapter-item "><a href="../cmdline/urls/connreuse.html"><strong aria-hidden="true">8.5.12.</strong> Connection reuse</a></li><li class="chapter-item "><a href="../cmdline/urls/parallel.html"><strong aria-hidden="true">8.5.13.</strong> Parallel transfers</a></li><li class="chapter-item "><a href="../cmdline/urls/trurl.html"><strong aria-hidden="true">8.5.14.</strong> trurl</a></li></ol></li><li class="chapter-item "><a href="../cmdline/configfile.html"><strong aria-hidden="true">8.6.</strong> Config file</a></li><li class="chapter-item "><a href="../cmdline/variables.html"><strong aria-hidden="true">8.7.</strong> Variables</a></li><li class="chapter-item "><a href="../cmdline/passwords.html"><strong aria-hidden="true">8.8.</strong> Passwords</a></li><li class="chapter-item "><a href="../cmdline/progressmeter.html"><strong aria-hidden="true">8.9.</strong> Progress meter</a></li><li class="chapter-item "><a href="../cmdline/curlver.html"><strong aria-hidden="true">8.10.</strong> Version</a></li><li class="chapter-item expanded "><a href="../cmdline/exitcode.html" class="active"><strong aria-hidden="true">8.11.</strong> Exit code</a></li><li class="chapter-item "><a href="../cmdline/copyas.html"><strong aria-hidden="true">8.12.</strong> Copy as curl</a></li></ol></li><li class="chapter-item "><a href="../usingcurl/index.html"><strong aria-hidden="true">9.</strong> Command line transfers</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="../usingcurl/verbose/index.html"><strong aria-hidden="true">9.1.</strong> Verbose</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="../usingcurl/verbose/trace.html"><strong aria-hidden="true">9.1.1.</strong> Trace options</a></li><li class="chapter-item "><a href="../usingcurl/verbose/writeout.html"><strong aria-hidden="true">9.1.2.</strong> Write out</a></li></ol></li><li class="chapter-item "><a href="../usingcurl/downloads/index.html"><strong aria-hidden="true">9.2.</strong> Downloads</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="../usingcurl/downloads/whatis.html"><strong aria-hidden="true">9.2.1.</strong> What is downloading?</a></li><li class="chapter-item "><a href="../usingcurl/downloads/storing.html"><strong aria-hidden="true">9.2.2.</strong> Storing downloads</a></li><li class="chapter-item "><a href="../usingcurl/downloads/url-named.html"><strong aria-hidden="true">9.2.3.</strong> Download to a file named by the URL</a></li><li class="chapter-item "><a href="../usingcurl/downloads/content-disp.html"><strong aria-hidden="true">9.2.4.</strong> Use the target filename from the server</a></li><li class="chapter-item "><a href="../usingcurl/downloads/charsets.html"><strong aria-hidden="true">9.2.5.</strong> HTML and charsets</a></li><li class="chapter-item "><a href="../usingcurl/downloads/redirects.html"><strong aria-hidden="true">9.2.6.</strong> Shell redirects</a></li><li class="chapter-item "><a href="../usingcurl/downloads/multiple.html"><strong aria-hidden="true">9.2.7.</strong> Multiple downloads</a></li><li class="chapter-item "><a href="../usingcurl/downloads/browsers.html"><strong aria-hidden="true">9.2.8.</strong> My browser shows something else</a></li><li class="chapter-item "><a href="../usingcurl/downloads/max-filesize.html"><strong aria-hidden="true">9.2.9.</strong> Maximum filesize</a></li><li class="chapter-item "><a href="../usingcurl/downloads/metadata-fs.html"><strong aria-hidden="true">9.2.10.</strong> Storing metadata in file system</a></li><li class="chapter-item "><a href="../usingcurl/downloads/raw.html"><strong aria-hidden="true">9.2.11.</strong> Raw</a></li><li class="chapter-item "><a href="../usingcurl/downloads/retry.html"><strong aria-hidden="true">9.2.12.</strong> Retry</a></li><li class="chapter-item "><a href="../usingcurl/downloads/resume.html"><strong aria-hidden="true">9.2.13.</strong> Resuming and ranges</a></li></ol></li><li class="chapter-item "><a href="../usingcurl/uploads.html"><strong aria-hidden="true">9.3.</strong> Uploads</a></li><li class="chapter-item "><a href="../usingcurl/transfers/index.html"><strong aria-hidden="true">9.4.</strong> Transfer controls</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="../usingcurl/transfers/tooslow.html"><strong aria-hidden="true">9.4.1.</strong> Stop slow transfers</a></li><li class="chapter-item "><a href="../usingcurl/transfers/rate-limiting.html"><strong aria-hidden="true">9.4.2.</strong> Rate limiting</a></li><li class="chapter-item "><a href="../usingcurl/transfers/request-rate.html"><strong aria-hidden="true">9.4.3.</strong> Request rate limiting</a></li><li class="chapter-item "><a href="../usingcurl/transfers/compression.html"><strong aria-hidden="true">9.4.4.</strong> Compression</a></li><li class="chapter-item "><a href="../usingcurl/transfers/skip.html"><strong aria-hidden="true">9.4.5.</strong> Skip download if already done</a></li></ol></li><li class="chapter-item "><a href="../usingcurl/connections/index.html"><strong aria-hidden="true">9.5.</strong> Connections</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="../usingcurl/connections/setup.html"><strong aria-hidden="true">9.5.1.</strong> Setup</a></li><li class="chapter-item "><a href="../usingcurl/connections/name.html"><strong aria-hidden="true">9.5.2.</strong> Name resolve tricks</a></li><li class="chapter-item "><a href="../usingcurl/connections/timeout.html"><strong aria-hidden="true">9.5.3.</strong> Connection timeout</a></li><li class="chapter-item "><a href="../usingcurl/connections/happy.html"><strong aria-hidden="true">9.5.4.</strong> Happy Eyeballs</a></li><li class="chapter-item "><a href="../usingcurl/connections/interface.html"><strong aria-hidden="true">9.5.5.</strong> Network interface</a></li><li class="chapter-item "><a href="../usingcurl/connections/local-port.html"><strong aria-hidden="true">9.5.6.</strong> Local port number</a></li><li class="chapter-item "><a href="../usingcurl/connections/keepalive.html"><strong aria-hidden="true">9.5.7.</strong> Keep alive</a></li></ol></li><li class="chapter-item "><a href="../usingcurl/timeouts.html"><strong aria-hidden="true">9.6.</strong> Timeouts</a></li><li class="chapter-item "><a href="../usingcurl/netrc.html"><strong aria-hidden="true">9.7.</strong> .netrc</a></li><li class="chapter-item "><a href="../usingcurl/proxies/index.html"><strong aria-hidden="true">9.8.</strong> Proxies</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="../usingcurl/proxies/discover.html"><strong aria-hidden="true">9.8.1.</strong> Discover your proxy</a></li><li class="chapter-item "><a href="../usingcurl/proxies/pac.html"><strong aria-hidden="true">9.8.2.</strong> PAC</a></li><li class="chapter-item "><a href="../usingcurl/proxies/captive.html"><strong aria-hidden="true">9.8.3.</strong> Captive portals</a></li><li class="chapter-item "><a href="../usingcurl/proxies/type.html"><strong aria-hidden="true">9.8.4.</strong> Proxy type</a></li><li class="chapter-item "><a href="../usingcurl/proxies/http.html"><strong aria-hidden="true">9.8.5.</strong> HTTP proxy</a></li><li class="chapter-item "><a href="../usingcurl/proxies/socks.html"><strong aria-hidden="true">9.8.6.</strong> SOCKS proxy</a></li><li class="chapter-item "><a href="../usingcurl/proxies/mitm.html"><strong aria-hidden="true">9.8.7.</strong> MITM proxy</a></li><li class="chapter-item "><a href="../usingcurl/proxies/auth.html"><strong aria-hidden="true">9.8.8.</strong> Proxy authentication</a></li><li class="chapter-item "><a href="../usingcurl/proxies/https.html"><strong aria-hidden="true">9.8.9.</strong> HTTPS proxy</a></li><li class="chapter-item "><a href="../usingcurl/proxies/env.html"><strong aria-hidden="true">9.8.10.</strong> Proxy environment variables</a></li><li class="chapter-item "><a href="../usingcurl/proxies/headers.html"><strong aria-hidden="true">9.8.11.</strong> Proxy headers</a></li><li class="chapter-item "><a href="../usingcurl/proxies/haproxy.html"><strong aria-hidden="true">9.8.12.</strong> haproxy</a></li></ol></li><li class="chapter-item "><a href="../usingcurl/tls.html"><strong aria-hidden="true">9.9.</strong> TLS</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="../usingcurl/tls/ciphers.html"><strong aria-hidden="true">9.9.1.</strong> Ciphers</a></li><li class="chapter-item "><a href="../usingcurl/tls/enable.html"><strong aria-hidden="true">9.9.2.</strong> Enable TLS</a></li><li class="chapter-item "><a href="../usingcurl/tls/versions.html"><strong aria-hidden="true">9.9.3.</strong> TLS versions</a></li><li class="chapter-item "><a href="../usingcurl/tls/verify.html"><strong aria-hidden="true">9.9.4.</strong> Verifying server certificates</a></li><li class="chapter-item "><a href="../usingcurl/tls/pinning.html"><strong aria-hidden="true">9.9.5.</strong> Certificate pinning</a></li><li class="chapter-item "><a href="../usingcurl/tls/stapling.html"><strong aria-hidden="true">9.9.6.</strong> OCSP stapling</a></li><li class="chapter-item "><a href="../usingcurl/tls/clientcert.html"><strong aria-hidden="true">9.9.7.</strong> Client certificates</a></li><li class="chapter-item "><a href="../usingcurl/tls/auth.html"><strong aria-hidden="true">9.9.8.</strong> TLS auth</a></li><li class="chapter-item "><a href="../usingcurl/tls/backends.html"><strong aria-hidden="true">9.9.9.</strong> TLS backends</a></li><li class="chapter-item "><a href="../usingcurl/tls/sslkeylogfile.html"><strong aria-hidden="true">9.9.10.</strong> SSLKEYLOGFILE</a></li></ol></li><li class="chapter-item "><a href="../usingcurl/ssh/index.html"><strong aria-hidden="true">9.10.</strong> SCP and SFTP</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="../usingcurl/ssh/url.html"><strong aria-hidden="true">9.10.1.</strong> URLs</a></li><li class="chapter-item "><a href="../usingcurl/ssh/auth.html"><strong aria-hidden="true">9.10.2.</strong> Authentication</a></li><li class="chapter-item "><a href="../usingcurl/ssh/knownhosts.html"><strong aria-hidden="true">9.10.3.</strong> Known hosts</a></li></ol></li><li class="chapter-item "><a href="../usingcurl/reademail.html"><strong aria-hidden="true">9.11.</strong> Reading email</a></li><li class="chapter-item "><a href="../usingcurl/smtp.html"><strong aria-hidden="true">9.12.</strong> Sending email</a></li><li class="chapter-item "><a href="../usingcurl/dict.html"><strong aria-hidden="true">9.13.</strong> DICT</a></li><li class="chapter-item "><a href="../usingcurl/ipfs.html"><strong aria-hidden="true">9.14.</strong> IPFS</a></li><li class="chapter-item "><a href="../usingcurl/mqtt.html"><strong aria-hidden="true">9.15.</strong> MQTT</a></li><li class="chapter-item "><a href="../usingcurl/telnet.html"><strong aria-hidden="true">9.16.</strong> TELNET</a></li><li class="chapter-item "><a href="../usingcurl/tftp.html"><strong aria-hidden="true">9.17.</strong> TFTP</a></li></ol></li><li class="chapter-item "><a href="../http/index.html"><strong aria-hidden="true">10.</strong> Command line HTTP</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="../http/method.html"><strong aria-hidden="true">10.1.</strong> Method</a></li><li class="chapter-item "><a href="../http/response.html"><strong aria-hidden="true">10.2.</strong> Responses</a></li><li class="chapter-item "><a href="../http/auth.html"><strong aria-hidden="true">10.3.</strong> Authentication</a></li><li class="chapter-item "><a href="../http/versions/index.html"><strong aria-hidden="true">10.4.</strong> HTTP versions</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="../http/versions/http09.html"><strong aria-hidden="true">10.4.1.</strong> HTTP/0.9</a></li><li class="chapter-item "><a href="../http/versions/http2.html"><strong aria-hidden="true">10.4.2.</strong> HTTP/2</a></li><li class="chapter-item "><a href="../http/versions/http3.html"><strong aria-hidden="true">10.4.3.</strong> HTTP/3</a></li></ol></li><li class="chapter-item "><a href="../http/post/index.html"><strong aria-hidden="true">10.5.</strong> HTTP POST</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="../http/post/simple.html"><strong aria-hidden="true">10.5.1.</strong> Simple POST</a></li><li class="chapter-item "><a href="../http/post/content-type.html"><strong aria-hidden="true">10.5.2.</strong> Content-Type</a></li><li class="chapter-item "><a href="../http/post/binary.html"><strong aria-hidden="true">10.5.3.</strong> Posting binary</a></li><li class="chapter-item "><a href="../http/post/json.html"><strong aria-hidden="true">10.5.4.</strong> JSON</a></li><li class="chapter-item "><a href="../http/post/url-encode.html"><strong aria-hidden="true">10.5.5.</strong> URL encode data</a></li><li class="chapter-item "><a href="../http/post/convert-to-get.html"><strong aria-hidden="true">10.5.6.</strong> Convert to GET</a></li><li class="chapter-item "><a href="../http/post/expect100.html"><strong aria-hidden="true">10.5.7.</strong> Expect 100-continue</a></li><li class="chapter-item "><a href="../http/post/chunked.html"><strong aria-hidden="true">10.5.8.</strong> Chunked encoded POSTs</a></li><li class="chapter-item "><a href="../http/post/hiddenfields.html"><strong aria-hidden="true">10.5.9.</strong> Hidden form fields</a></li><li class="chapter-item "><a href="../http/post/browsersends.html"><strong aria-hidden="true">10.5.10.</strong> Figure out what a browser sends</a></li><li class="chapter-item "><a href="../http/post/javascript.html"><strong aria-hidden="true">10.5.11.</strong> JavaScript and forms</a></li><li class="chapter-item "><a href="../http/post/multipart.html"><strong aria-hidden="true">10.5.12.</strong> Multipart formposts</a></li><li class="chapter-item "><a href="../http/post/postvspost.html"><strong aria-hidden="true">10.5.13.</strong> -d vs -F</a></li></ol></li><li class="chapter-item "><a href="../http/put.html"><strong aria-hidden="true">10.6.</strong> HTTP PUT</a></li><li class="chapter-item "><a href="../http/redirects.html"><strong aria-hidden="true">10.7.</strong> Redirects</a></li><li class="chapter-item "><a href="../http/modify/index.html"><strong aria-hidden="true">10.8.</strong> Customize your HTTP</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="../http/modify/method.html"><strong aria-hidden="true">10.8.1.</strong> Request method</a></li><li class="chapter-item "><a href="../http/modify/target.html"><strong aria-hidden="true">10.8.2.</strong> Request target</a></li><li class="chapter-item "><a href="../http/modify/fragment.html"><strong aria-hidden="true">10.8.3.</strong> Fragment</a></li><li class="chapter-item "><a href="../http/modify/headers.html"><strong aria-hidden="true">10.8.4.</strong> Customize headers</a></li><li class="chapter-item "><a href="../http/modify/referer.html"><strong aria-hidden="true">10.8.5.</strong> Referer</a></li><li class="chapter-item "><a href="../http/modify/user-agent.html"><strong aria-hidden="true">10.8.6.</strong> User-agent</a></li><li class="chapter-item "><a href="../http/modify/ranges.html"><strong aria-hidden="true">10.8.7.</strong> Ranges</a></li><li class="chapter-item "><a href="../http/modify/conditionals.html"><strong aria-hidden="true">10.8.8.</strong> Conditionals</a></li><li class="chapter-item "><a href="../http/modify/compression.html"><strong aria-hidden="true">10.8.9.</strong> Compression</a></li></ol></li><li class="chapter-item "><a href="../http/cookies/index.html"><strong aria-hidden="true">10.9.</strong> Cookies</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="../http/cookies/engine.html"><strong aria-hidden="true">10.9.1.</strong> Cookie engine</a></li><li class="chapter-item "><a href="../http/cookies/reading.html"><strong aria-hidden="true">10.9.2.</strong> Reading cookies from file</a></li><li class="chapter-item "><a href="../http/cookies/writing.html"><strong aria-hidden="true">10.9.3.</strong> Writing cookies to file</a></li><li class="chapter-item "><a href="../http/cookies/newsession.html"><strong aria-hidden="true">10.9.4.</strong> New cookie session</a></li><li class="chapter-item "><a href="../http/cookies/fileformat.html"><strong aria-hidden="true">10.9.5.</strong> Cookie file format</a></li></ol></li><li class="chapter-item "><a href="../http/https.html"><strong aria-hidden="true">10.10.</strong> HTTPS</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="../http/https/hsts.html"><strong aria-hidden="true">10.10.1.</strong> HSTS</a></li><li class="chapter-item "><a href="../http/https/altsvc.html"><strong aria-hidden="true">10.10.2.</strong> Alternative Services</a></li></ol></li><li class="chapter-item "><a href="../http/browserlike.html"><strong aria-hidden="true">10.11.</strong> Scripting browser-like tasks</a></li></ol></li><li class="chapter-item "><a href="../ftp/index.html"><strong aria-hidden="true">11.</strong> Command line FTP</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="../ftp/dirlist.html"><strong aria-hidden="true">11.1.</strong> FTP Directory listing</a></li><li class="chapter-item "><a href="../ftp/upload.html"><strong aria-hidden="true">11.2.</strong> Uploading with FTP</a></li><li class="chapter-item "><a href="../ftp/cmds.html"><strong aria-hidden="true">11.3.</strong> Custom FTP commands</a></li><li class="chapter-item "><a href="../ftp/twoconnections.html"><strong aria-hidden="true">11.4.</strong> Two connections</a></li><li class="chapter-item "><a href="../ftp/traversedir.html"><strong aria-hidden="true">11.5.</strong> Directory traversing</a></li><li class="chapter-item "><a href="../ftp/ftps.html"><strong aria-hidden="true">11.6.</strong> FTPS</a></li></ol></li><li class="chapter-item "><a href="../libcurl/index.html"><strong aria-hidden="true">12.</strong> libcurl</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="../libcurl/headers.html"><strong aria-hidden="true">12.1.</strong> Header files</a></li><li class="chapter-item "><a href="../libcurl/globalinit.html"><strong aria-hidden="true">12.2.</strong> Global initialization</a></li><li class="chapter-item "><a href="../libcurl/api.html"><strong aria-hidden="true">12.3.</strong> API compatibility</a></li><li class="chapter-item "><a href="../libcurl/--libcurl.html"><strong aria-hidden="true">12.4.</strong> --libcurl</a></li><li class="chapter-item "><a href="../libcurl/threading.html"><strong aria-hidden="true">12.5.</strong> multi-threading</a></li><li class="chapter-item "><a href="../libcurl/curlcode.html"><strong aria-hidden="true">12.6.</strong> CURLcode return codes</a></li><li class="chapter-item "><a href="../libcurl/verbose.html"><strong aria-hidden="true">12.7.</strong> Verbose operations</a></li><li class="chapter-item "><a href="../libcurl/caches.html"><strong aria-hidden="true">12.8.</strong> Caches</a></li><li class="chapter-item "><a href="../libcurl/performance.html"><strong aria-hidden="true">12.9.</strong> Performance</a></li><li class="chapter-item "><a href="../libcurl/cplusplus.html"><strong aria-hidden="true">12.10.</strong> for C++ programmers</a></li></ol></li><li class="chapter-item "><a href="../transfers/index.html"><strong aria-hidden="true">13.</strong> libcurl transfers</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="../transfers/easyhandle.html"><strong aria-hidden="true">13.1.</strong> Easy handle</a></li><li class="chapter-item "><a href="../transfers/options/index.html"><strong aria-hidden="true">13.2.</strong> curl easy options</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="../transfers/options/num.html"><strong aria-hidden="true">13.2.1.</strong> Set numerical options</a></li><li class="chapter-item "><a href="../transfers/options/strings.html"><strong aria-hidden="true">13.2.2.</strong> Set string options</a></li><li class="chapter-item "><a href="../transfers/options/tls.html"><strong aria-hidden="true">13.2.3.</strong> TLS options</a></li><li class="chapter-item "><a href="../transfers/options/all.html"><strong aria-hidden="true">13.2.4.</strong> All options</a></li><li class="chapter-item "><a href="../transfers/options/info.html"><strong aria-hidden="true">13.2.5.</strong> Get option information</a></li></ol></li><li class="chapter-item "><a href="../transfers/drive/index.html"><strong aria-hidden="true">13.3.</strong> Drive transfers</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="../transfers/drive/easy.html"><strong aria-hidden="true">13.3.1.</strong> Drive with easy</a></li><li class="chapter-item "><a href="../transfers/drive/multi.html"><strong aria-hidden="true">13.3.2.</strong> Drive with multi</a></li><li class="chapter-item "><a href="../transfers/drive/multi-socket.html"><strong aria-hidden="true">13.3.3.</strong> Drive with multi_socket</a></li></ol></li><li class="chapter-item "><a href="../transfers/callbacks/index.html"><strong aria-hidden="true">13.4.</strong> Callbacks</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="../transfers/callbacks/write.html"><strong aria-hidden="true">13.4.1.</strong> Write data</a></li><li class="chapter-item "><a href="../transfers/callbacks/read.html"><strong aria-hidden="true">13.4.2.</strong> Read data</a></li><li class="chapter-item "><a href="../transfers/callbacks/progress.html"><strong aria-hidden="true">13.4.3.</strong> Progress information</a></li><li class="chapter-item "><a href="../transfers/callbacks/header.html"><strong aria-hidden="true">13.4.4.</strong> Header data</a></li><li class="chapter-item "><a href="../transfers/callbacks/debug.html"><strong aria-hidden="true">13.4.5.</strong> Debug</a></li><li class="chapter-item "><a href="../transfers/callbacks/sockopt.html"><strong aria-hidden="true">13.4.6.</strong> sockopt</a></li><li class="chapter-item "><a href="../transfers/callbacks/sslcontext.html"><strong aria-hidden="true">13.4.7.</strong> SSL context</a></li><li class="chapter-item "><a href="../transfers/callbacks/seek.html"><strong aria-hidden="true">13.4.8.</strong> Seek and ioctl</a></li><li class="chapter-item "><a href="../transfers/callbacks/conversions.html"><strong aria-hidden="true">13.4.9.</strong> Network data conversion</a></li><li class="chapter-item "><a href="../transfers/callbacks/openclosesocket.html"><strong aria-hidden="true">13.4.10.</strong> Opensocket and closesocket</a></li><li class="chapter-item "><a href="../transfers/callbacks/sshkey.html"><strong aria-hidden="true">13.4.11.</strong> SSH key</a></li><li class="chapter-item "><a href="../transfers/callbacks/rtsp.html"><strong aria-hidden="true">13.4.12.</strong> RTSP interleaved data</a></li><li class="chapter-item "><a href="../transfers/callbacks/ftpmatch.html"><strong aria-hidden="true">13.4.13.</strong> FTP wildcard matching</a></li><li class="chapter-item "><a href="../transfers/callbacks/resolver.html"><strong aria-hidden="true">13.4.14.</strong> Resolver start</a></li><li class="chapter-item "><a href="../transfers/callbacks/trailers.html"><strong aria-hidden="true">13.4.15.</strong> Sending trailers</a></li><li class="chapter-item "><a href="../transfers/callbacks/hsts.html"><strong aria-hidden="true">13.4.16.</strong> HSTS</a></li><li class="chapter-item "><a href="../transfers/callbacks/prereq.html"><strong aria-hidden="true">13.4.17.</strong> Prereq</a></li></ol></li><li class="chapter-item "><a href="../transfers/conn/index.html"><strong aria-hidden="true">13.5.</strong> Connection control</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="../transfers/conn/how.html"><strong aria-hidden="true">13.5.1.</strong> How libcurl connects</a></li><li class="chapter-item "><a href="../transfers/conn/local.html"><strong aria-hidden="true">13.5.2.</strong> Local address and port number</a></li><li class="chapter-item "><a href="../transfers/conn/reuse.html"><strong aria-hidden="true">13.5.3.</strong> Connection reuse</a></li><li class="chapter-item "><a href="../transfers/conn/keepalive.html"><strong aria-hidden="true">13.5.4.</strong> Keep alive</a></li><li class="chapter-item "><a href="../transfers/conn/names.html"><strong aria-hidden="true">13.5.5.</strong> Name resolving</a></li><li class="chapter-item "><a href="../transfers/conn/proxies.html"><strong aria-hidden="true">13.5.6.</strong> Proxies</a></li></ol></li><li class="chapter-item "><a href="../transfers/control/index.html"><strong aria-hidden="true">13.6.</strong> Transfer control</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="../transfers/control/stop.html"><strong aria-hidden="true">13.6.1.</strong> Stop</a></li><li class="chapter-item "><a href="../transfers/control/stopslow.html"><strong aria-hidden="true">13.6.2.</strong> Stop slow transfers</a></li><li class="chapter-item "><a href="../transfers/control/ratelimit.html"><strong aria-hidden="true">13.6.3.</strong> Rate limit</a></li><li class="chapter-item "><a href="../transfers/control/meter.html"><strong aria-hidden="true">13.6.4.</strong> Progress meter</a></li><li class="chapter-item "><a href="../transfers/control/progress-callback.html"><strong aria-hidden="true">13.6.5.</strong> Progress callback</a></li></ol></li><li class="chapter-item "><a href="../transfers/auth.html"><strong aria-hidden="true">13.7.</strong> Authentication</a></li><li class="chapter-item "><a href="../transfers/cleanup.html"><strong aria-hidden="true">13.8.</strong> Cleanup</a></li><li class="chapter-item "><a href="../transfers/getinfo.html"><strong aria-hidden="true">13.9.</strong> Post transfer info</a></li></ol></li><li class="chapter-item "><a href="../libcurl-http/index.html"><strong aria-hidden="true">14.</strong> libcurl HTTP</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="../libcurl-http/responses.html"><strong aria-hidden="true">14.1.</strong> Responses</a></li><li class="chapter-item "><a href="../libcurl-http/requests.html"><strong aria-hidden="true">14.2.</strong> Requests</a></li><li class="chapter-item "><a href="../libcurl-http/versions.html"><strong aria-hidden="true">14.3.</strong> Versions</a></li><li class="chapter-item "><a href="../libcurl-http/ranges.html"><strong aria-hidden="true">14.4.</strong> Ranges</a></li><li class="chapter-item "><a href="../libcurl-http/auth.html"><strong aria-hidden="true">14.5.</strong> Authentication</a></li><li class="chapter-item "><a href="../libcurl-http/cookies.html"><strong aria-hidden="true">14.6.</strong> Cookies</a></li><li class="chapter-item "><a href="../libcurl-http/download.html"><strong aria-hidden="true">14.7.</strong> Download</a></li><li class="chapter-item "><a href="../libcurl-http/upload.html"><strong aria-hidden="true">14.8.</strong> Upload</a></li><li class="chapter-item "><a href="../libcurl-http/multiplexing.html"><strong aria-hidden="true">14.9.</strong> Multiplexing</a></li><li class="chapter-item "><a href="../libcurl-http/hsts.html"><strong aria-hidden="true">14.10.</strong> HSTS</a></li><li class="chapter-item "><a href="../libcurl-http/alt-svc.html"><strong aria-hidden="true">14.11.</strong> alt-svc</a></li></ol></li><li class="chapter-item "><a href="../helpers/index.html"><strong aria-hidden="true">15.</strong> libcurl helpers</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="../helpers/sharing.html"><strong aria-hidden="true">15.1.</strong> Share data between handles</a></li><li class="chapter-item "><a href="../helpers/url/index.html"><strong aria-hidden="true">15.2.</strong> URL API</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="../helpers/url/include.html"><strong aria-hidden="true">15.2.1.</strong> Include files</a></li><li class="chapter-item "><a href="../helpers/url/init.html"><strong aria-hidden="true">15.2.2.</strong> Create, cleanup, duplicate</a></li><li class="chapter-item "><a href="../helpers/url/parse.html"><strong aria-hidden="true">15.2.3.</strong> Parse a URL</a></li><li class="chapter-item "><a href="../helpers/url/redirect.html"><strong aria-hidden="true">15.2.4.</strong> Redirect to URL</a></li><li class="chapter-item "><a href="../helpers/url/get.html"><strong aria-hidden="true">15.2.5.</strong> Get a URL</a></li><li class="chapter-item "><a href="../helpers/url/get-part.html"><strong aria-hidden="true">15.2.6.</strong> Get URL parts</a></li><li class="chapter-item "><a href="../helpers/url/set-part.html"><strong aria-hidden="true">15.2.7.</strong> Set URL parts</a></li><li class="chapter-item "><a href="../helpers/url/append-query.html"><strong aria-hidden="true">15.2.8.</strong> Append to the query</a></li><li class="chapter-item "><a href="../helpers/url/setopt.html"><strong aria-hidden="true">15.2.9.</strong> CURLOPT_CURLU</a></li></ol></li><li class="chapter-item "><a href="../helpers/ws/index.html"><strong aria-hidden="true">15.3.</strong> WebSocket</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="../helpers/ws/support.html"><strong aria-hidden="true">15.3.1.</strong> Support</a></li><li class="chapter-item "><a href="../helpers/ws/urls.html"><strong aria-hidden="true">15.3.2.</strong> URLs</a></li><li class="chapter-item "><a href="../helpers/ws/concept.html"><strong aria-hidden="true">15.3.3.</strong> Concept</a></li><li class="chapter-item "><a href="../helpers/ws/options.html"><strong aria-hidden="true">15.3.4.</strong> Options</a></li><li class="chapter-item "><a href="../helpers/ws/read.html"><strong aria-hidden="true">15.3.5.</strong> Read</a></li><li class="chapter-item "><a href="../helpers/ws/meta.html"><strong aria-hidden="true">15.3.6.</strong> Meta</a></li><li class="chapter-item "><a href="../helpers/ws/write.html"><strong aria-hidden="true">15.3.7.</strong> Write</a></li></ol></li><li class="chapter-item "><a href="../helpers/headerapi/index.html"><strong aria-hidden="true">15.4.</strong> Headers API</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="../helpers/headerapi/struct.html"><strong aria-hidden="true">15.4.1.</strong> Header struct</a></li><li class="chapter-item "><a href="../helpers/headerapi/get.html"><strong aria-hidden="true">15.4.2.</strong> Get a header</a></li><li class="chapter-item "><a href="../helpers/headerapi/iterate.html"><strong aria-hidden="true">15.4.3.</strong> Iterate over headers</a></li></ol></li></ol></li><li class="chapter-item "><a href="../examples/index.html"><strong aria-hidden="true">16.</strong> libcurl examples</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="../examples/get.html"><strong aria-hidden="true">16.1.</strong> Get a simple HTTP page</a></li><li class="chapter-item "><a href="../examples/getinmem.html"><strong aria-hidden="true">16.2.</strong> Get a response into memory</a></li><li class="chapter-item "><a href="../examples/login.html"><strong aria-hidden="true">16.3.</strong> Submit a login form over HTTP</a></li><li class="chapter-item "><a href="../examples/ftplist.html"><strong aria-hidden="true">16.4.</strong> Get an FTP directory listing</a></li><li class="chapter-item "><a href="../examples/http-ul-nonblock.html"><strong aria-hidden="true">16.5.</strong> Non-blocking HTTP form-post</a></li></ol></li><li class="chapter-item "><a href="../bindings/index.html"><strong aria-hidden="true">17.</strong> libcurl bindings</a></li><li class="chapter-item "><a href="../internals/index.html"><strong aria-hidden="true">18.</strong> libcurl internals</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="../internals/easy.html"><strong aria-hidden="true">18.1.</strong> Easy handles and connections</a></li><li class="chapter-item "><a href="../internals/multi.html"><strong aria-hidden="true">18.2.</strong> Everything is multi</a></li><li class="chapter-item "><a href="../internals/statemachines.html"><strong aria-hidden="true">18.3.</strong> State machines</a></li><li class="chapter-item "><a href="../internals/handler.html"><strong aria-hidden="true">18.4.</strong> Protocol handler</a></li><li class="chapter-item "><a href="../internals/backends.html"><strong aria-hidden="true">18.5.</strong> Backends</a></li><li class="chapter-item "><a href="../internals/caches.html"><strong aria-hidden="true">18.6.</strong> Caches and state</a></li><li class="chapter-item "><a href="../internals/timeouts.html"><strong aria-hidden="true">18.7.</strong> Timeouts</a></li><li class="chapter-item "><a href="../internals/windows-vs-unix.html"><strong aria-hidden="true">18.8.</strong> Windows vs Unix</a></li><li class="chapter-item "><a href="../internals/memory-debugging.html"><strong aria-hidden="true">18.9.</strong> Memory debugging</a></li><li class="chapter-item "><a href="../internals/content-encoding.html"><strong aria-hidden="true">18.10.</strong> Content Encoding</a></li><li class="chapter-item "><a href="../internals/structs.html"><strong aria-hidden="true">18.11.</strong> Structs</a></li><li class="chapter-item "><a href="../internals/resolving.html"><strong aria-hidden="true">18.12.</strong> Resolving hostnames</a></li><li class="chapter-item "><a href="../internals/tests/index.html"><strong aria-hidden="true">18.13.</strong> Tests</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="../internals/tests/file-format.html"><strong aria-hidden="true">18.13.1.</strong> Test file format</a></li><li class="chapter-item "><a href="../internals/tests/build.html"><strong aria-hidden="true">18.13.2.</strong> Build tests</a></li><li class="chapter-item "><a href="../internals/tests/run.html"><strong aria-hidden="true">18.13.3.</strong> Run tests</a></li><li class="chapter-item "><a href="../internals/tests/debug.html"><strong aria-hidden="true">18.13.4.</strong> Debug builds</a></li><li class="chapter-item "><a href="../internals/tests/servers.html"><strong aria-hidden="true">18.13.5.</strong> Test servers</a></li><li class="chapter-item "><a href="../internals/tests/curl.html"><strong aria-hidden="true">18.13.6.</strong> curl tests</a></li><li class="chapter-item "><a href="../internals/tests/libcurl.html"><strong aria-hidden="true">18.13.7.</strong> libcurl tests</a></li><li class="chapter-item "><a href="../internals/tests/unit.html"><strong aria-hidden="true">18.13.8.</strong> Unit tests</a></li><li class="chapter-item "><a href="../internals/tests/valgrind.html"><strong aria-hidden="true">18.13.9.</strong> Valgrind</a></li><li class="chapter-item "><a href="../internals/tests/ci.html"><strong aria-hidden="true">18.13.10.</strong> Continuous Integration</a></li><li class="chapter-item "><a href="../internals/tests/autobuilds.html"><strong aria-hidden="true">18.13.11.</strong> Autobuilds</a></li><li class="chapter-item "><a href="../internals/tests/torture.html"><strong aria-hidden="true">18.13.12.</strong> Torture</a></li></ol></li></ol></li><li class="chapter-item "><a href="../bookindex.html"><strong aria-hidden="true">19.</strong> Index</a></li></ol> </div> <div id="sidebar-resize-handle" class="sidebar-resize-handle"> <div class="sidebar-resize-indicator"></div> </div> </nav> <!-- Track and set sidebar scroll position --> <script> var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox'); sidebarScrollbox.addEventListener('click', function(e) { if (e.target.tagName === 'A') { sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop); } }, { passive: true }); var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll'); sessionStorage.removeItem('sidebar-scroll'); if (sidebarScrollTop) { // preserve sidebar scroll position when navigating via links within sidebar sidebarScrollbox.scrollTop = sidebarScrollTop; } else { // scroll sidebar to current active section when navigating via "next/previous chapter" buttons var activeSection = document.querySelector('#sidebar .active'); if (activeSection) { activeSection.scrollIntoView({ block: 'center' }); } } </script> <div id="page-wrapper" class="page-wrapper"> <div class="page"> <div id="menu-bar-hover-placeholder"></div> <div id="menu-bar" class="menu-bar sticky"> <div class="left-buttons"> <label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar"> <i class="fa fa-bars"></i> </label> <button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list"> <i class="fa fa-paint-brush"></i> </button> <ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu"> <li role="none"><button role="menuitem" class="theme" id="light">Light</button></li> <li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li> <li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li> <li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li> <li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li> </ul> <button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar"> <i class="fa fa-search"></i> </button> </div> <h1 class="menu-title">everything curl</h1> <div class="right-buttons"> <a href="../print.html" title="Print this book" aria-label="Print this book"> <i id="print-button" class="fa fa-print"></i> </a> </div> </div> <div id="search-wrapper" class="hidden"> <form id="searchbar-outer" class="searchbar-outer"> <input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header"> </form> <div id="searchresults-outer" class="searchresults-outer hidden"> <div id="searchresults-header" class="searchresults-header"></div> <ul id="searchresults"> </ul> </div> </div> <!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM --> <script> document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible'); document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible'); Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) { link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1); }); </script> <div id="content" class="content"> <main> <h1 id="exit-code"><a class="header" href="#exit-code">Exit code</a></h1> <p>A lot of effort has gone into the project to make curl return a usable exit code when something goes wrong and it always returns 0 (zero) when the operation went as planned.</p> <p>If you write a shell script or batch file that invokes curl, you can always check the return code to detect problems in the invoked command. Below, you find a list of return codes as of the time of this writing. Over time we tend to slowly add new ones so if you get a code back not listed here, please refer to more updated curl documentation for aid.</p> <p>A basic Unix shell script could look like something like this:</p> <pre><code>#!/bin/sh curl http://example.com res=$? if test "$res" != "0"; then echo "the curl command failed with: $res" fi </code></pre> <h2 id="available-exit-codes"><a class="header" href="#available-exit-codes">Available exit codes</a></h2> <ol> <li> <p>Unsupported protocol. This build of curl has no support for this protocol. Usually this happens because the URL was misspelled to use a scheme part that either has a space in front of it or spells <code>http</code> like <code>htpt</code> or similar. Another common mistake is that you use a libcurl installation that was built with one or more protocols disabled and you now ask libcurl to use one of those protocols that were disabled in the build.</p> </li> <li> <p>Failed to initialize. This is mostly an internal error or a problem with the libcurl installation or system libcurl runs in.</p> </li> <li> <p>URL malformed. The syntax was not correct. This happens when you mistype a URL so that it ends up wrong, or in rare situations you are using a URL that is accepted by another tool that curl does not support only because there is no universal URL standard that everyone adheres to.</p> </li> <li> <p>A feature or option that was needed to perform the desired request was not enabled or was explicitly disabled at build-time. To make curl able to do this, you probably need another build of libcurl.</p> </li> <li> <p>Could not resolve proxy. The address of the given proxy host could not be resolved. Either the given proxy name is just wrong, or the DNS server is misbehaving and does not know about this name when it should or perhaps even the system you run curl on is misconfigured so that it does not find/use the correct DNS server.</p> </li> <li> <p>Could not resolve host. The given remote host's address was not resolved. The address of the given server could not be resolved. Either the given hostname is just wrong, or the DNS server is misbehaving and does not know about this name when it should or perhaps even the system you run curl on is misconfigured so that it does not find/use the correct DNS server.</p> </li> <li> <p>Failed to connect to host. curl managed to get an IP address to the machine and it tried to set up a TCP connection to the host but failed. This can be because you have specified the wrong port number, entered the wrong hostname, the wrong protocol or perhaps because there is a firewall or other network equipment in between that blocks the traffic from getting through.</p> </li> <li> <p>Unknown FTP server response. The server sent data curl could not parse. This is either because of a bug in curl, a bug in the server or because the server is using an FTP protocol extension that curl does not support. The only real work-around for this is to tweak curl options to try to get it to use other FTP commands that perhaps do not get this unknown server response back.</p> </li> <li> <p>FTP access denied. The server denied login or denied access to the particular resource or directory you wanted to reach. Most often you tried to change to a directory that does not exist on the server. The directory of course is what you specify in the URL.</p> </li> <li> <p>FTP accept failed. While waiting for the server to connect back when an active FTP session is used, an error code was sent over the control connection or similar.</p> </li> <li> <p>FTP weird PASS reply. Curl could not parse the reply sent to the PASS request. PASS in the command curl sends the password to the server with, and even anonymous connections to FTP server actually sends a password - a fixed anonymous string. Getting a response back from this command that curl does not understand is a strong indication that this is not an FTP server at all or that the server is badly broken.</p> </li> <li> <p>During an active FTP session (PORT is used) while waiting for the server to connect, the timeout expired. It took too long for the server to get back. This is usually a sign that something is preventing the server from reaching curl successfully, such as a firewall or other network arrangements.</p> </li> <li> <p>Unknown response to FTP PASV command. Curl could not parse the reply sent to the PASV request. This is a strange server. PASV is used to set up the second data transfer connection in passive mode, see the <a href="../ftp/twoconnections.html">FTP uses two connections</a> section for more on that. You might be able to work-around this problem by using PORT instead, with the <code>--ftp-port</code> option.</p> </li> <li> <p>Unknown FTP 227 format. Curl could not parse the 227-line the server sent. This is most certainly a broken server. A 227 is the FTP server's response when sending back information on how curl should connect back to it in passive mode. You might be able to work-around this problem by using PORT instead, with the <code>--ftp-port</code> option.</p> </li> <li> <p>FTP cannot get host. Could not use the host IP address we got in the 227-line. This is most likely an internal error.</p> </li> <li> <p>HTTP/2 error. A problem was detected in the HTTP2 framing layer. This is somewhat generic and can be one out of several problems, see the error message for details.</p> </li> <li> <p>FTP could not set binary. Could not change transfer method to binary. This server is broken. curl needs to set the transfer to the correct mode before it is started as otherwise the transfer cannot work.</p> </li> <li> <p>Partial file. Only a part of the file was transferred. When the transfer is considered complete, curl verifies that it actually received the same amount of data that it was told before-hand that it was going to get. If the two numbers do not match, this is the error code. It could mean that curl got fewer bytes than advertised or that it got more. curl itself cannot know which number is wrong or which is correct, if any.</p> </li> <li> <p>FTP could not download/access the given file. The RETR (or similar) command failed. curl got an error from the server when trying to download the file.</p> </li> <li> <p><strong>Not used</strong></p> </li> <li> <p>Quote error. A quote command returned an error from the server. curl allows several different ways to send custom commands to an IMAP, POP3, SMTP or FTP server and features a generic check that the commands work. When any of the individually issued commands fails, this is the exit status returned. The advice is generally to watch the headers in the FTP communication to better understand exactly what failed and how.</p> </li> <li> <p>HTTP page not retrieved. The requested URL was not found or returned another error with the HTTP error code being 400 or above. This return code only appears if <code>-f, --fail</code> is used.</p> </li> <li> <p>Write error. Curl could not write data to a local filesystem or similar. curl receives data chunk by chunk from the network and it stores it like at (or writes it to stdout), one piece at a time. If that write action gets an error, this is the exit status.</p> </li> <li> <p><strong>Not used</strong></p> </li> <li> <p>Upload failed. The server refused to accept or store the file that curl tried to send to it. This is usually due to wrong access rights on the server but can also happen due to out of disk space or other resource constraints. This error can happen for many protocols.</p> </li> <li> <p>Read error. Various reading problems. The inverse to exit status 23. When curl sends data to a server, it reads data chunk by chunk from a local file or stdin or similar, and if that reading fails in some way this is the exit status curl returns.</p> </li> <li> <p>Out of memory. A memory allocation request failed. curl needed to allocate more memory than what the system was willing to give it and curl had to exit. Try using smaller files or make sure that curl gets more memory to work with.</p> </li> <li> <p>Operation timeout. The specified time-out period was reached according to the conditions. curl offers several <a href="../usingcurl/timeouts.html">timeouts</a>, and this exit code tells one of those timeout limits were reached. Extend the timeout or try changing something else that allows curl to finish its operation faster. Often, this happens due to network and remote server situations that you cannot affect locally.</p> </li> <li> <p><strong>Not used</strong></p> </li> <li> <p>FTP PORT failed. The PORT command failed. Not all FTP servers support the PORT command; try doing a transfer using PASV instead. The PORT command is used to ask the server to create the data connection by <em>connecting back</em> to curl. See also the <a href="../ftp/twoconnections.html">FTP uses two connections</a> section.</p> </li> <li> <p>FTP could not use REST. The REST command failed. This command is used for resumed FTP transfers. curl needs to issue the REST command to do range or resumed transfers. The server is broken, try the same operation without range/resume as a crude work-around.</p> </li> <li> <p><strong>Not used</strong></p> </li> <li> <p>HTTP range error. The range request did not work. Resumed HTTP requests are not necessarily acknowledged or supported, so this exit code signals that for this resource on this server, there can be no range or resumed transfers.</p> </li> <li> <p>HTTP post error. Internal post-request generation error. If you get this error, please report the exact circumstances to the curl project.</p> </li> <li> <p>A TLS/SSL connect error. The SSL handshake failed. The SSL handshake can fail due to numerous different reasons so the error message may offer some additional clues. Maybe the parties could not agree to a SSL/TLS version, an agreeable cipher suite or similar.</p> </li> <li> <p>Bad download resume. Could not continue an earlier aborted download. When asking to resume a transfer that then ends up not possible to do, this error can get returned. For FILE, FTP or SFTP.</p> </li> <li> <p>Could not read the given file when using the FILE:// scheme. Failed to open the file. The file could be non-existing or is it a permission problem perhaps?</p> </li> <li> <p>LDAP cannot bind. LDAP "bind" operation failed, which is a necessary step in the LDAP operation and thus this means the LDAP query could not be performed. This might happen because of a wrong username or password, or for other reasons.</p> </li> <li> <p>LDAP search failed. The given search terms caused the LDAP search to return an error.</p> </li> <li> <p><strong>Not used</strong></p> </li> <li> <p><strong>Not used</strong></p> </li> <li> <p>Aborted by callback. An application told libcurl to abort the operation. This error code is not generally made visible to users and not to users of the curl tool.</p> </li> <li> <p>Bad function argument. A function was called with a bad parameter - this return code is present to help application authors to understand why libcurl cannot perform certain actions and should never be returned by the curl tool. Please file a bug report to the curl project if this happens to you.</p> </li> <li> <p><strong>Not used</strong></p> </li> <li> <p>Interface error. A specified outgoing network interface could not be used. curl typically decides outgoing network and IP addresses by itself but when explicitly asked to use a specific one that curl cannot use, this error can occur.</p> </li> <li> <p><strong>Not used</strong></p> </li> <li> <p>Too many redirects. When following HTTP redirects, libcurl hit the maximum number set by the application. The maximum number of redirects is unlimited by libcurl but is set to 50 by default by the curl tool. The limit is present to stop endless redirect loops. Change the limit with <code>--max-redirs</code>.</p> </li> <li> <p>Unknown option specified to libcurl. This could happen if you use a curl version that is out of sync with the underlying libcurl version. Perhaps your newer curl tries to use an option in the older libcurl that was not introduced until after the libcurl version you are using but is known to your curl tool code as that is newer. To decrease the risk of this and make sure it does not happen: use curl and libcurl of the same version number.</p> </li> <li> <p>Malformed telnet option. The telnet option you provided to curl did not use the correct syntax.</p> </li> <li> <p><strong>Not used</strong></p> </li> <li> <p>The server's SSL/TLS certificate or SSH fingerprint failed verification. curl can then not be sure of the server being who it claims to be. See the <a href="../usingcurl/tls.html">using TLS with curl</a> and <a href="../usingcurl/ssh/">using SCP and SFTP with curl</a> sections for more details.</p> </li> <li> <p>The server did not reply anything, which in this context is considered an error. When an HTTP(S) server responds to an HTTP(S) request, it always returns <em>something</em> as long as it is alive and sound. All valid HTTP responses have a status line and responses header. Not getting anything at all back is an indication the server is faulty or perhaps that something prevented curl from reaching the right server or that you are trying to connect to the wrong port number etc.</p> </li> <li> <p>SSL crypto engine not found.</p> </li> <li> <p>Cannot set SSL crypto engine as default.</p> </li> <li> <p>Failed sending network data. Sending data over the network is a crucial part of most curl operations and when curl gets an error from the lowest networking layers that the sending failed, this exit status gets returned. To pinpoint why this happens, some serious digging is usually required. Start with enabling verbose mode, do tracing and if possible check the network traffic with a tool like Wireshark or similar.</p> </li> <li> <p>Failure in receiving network data. Receiving data over the network is a crucial part of most curl operations and when curl gets an error from the lowest networking layers that the receiving of data failed, this exit status gets returned. To pinpoint why this happens, some serious digging is usually required. Start with enabling verbose mode, do tracing and if possible check the network traffic with a tool like Wireshark or similar.</p> </li> <li> <p><strong>Not used</strong></p> </li> <li> <p>Problem with the local certificate. The client certificate had a problem so it could not be used. Permissions? The wrong passphrase?</p> </li> <li> <p>Could not use the specified SSL cipher. The cipher names need to be specified exactly and they are also unfortunately specific to the particular TLS backend curl has been built to use. For the current list of support ciphers and how to write them, see the online docs at <a href="https://curl.se/docs/ssl-ciphers.html">https://curl.se/docs/ssl-ciphers.html</a>.</p> </li> <li> <p>Peer certificate cannot be authenticated with known CA certificates. This usually means that the certificate is either self-signed or signed by a CA (Certificate Authority) that is not present in the CA store curl uses.</p> </li> <li> <p>Unrecognized transfer encoding. Content received from the server could not be parsed by curl.</p> </li> <li> <p><strong>Not used</strong></p> </li> <li> <p>Maximum file size exceeded. When curl has been told to restrict downloads to not do it if the file is too big, this is the exit code for that condition.</p> </li> <li> <p>Requested SSL (TLS) level failed. In most cases this means that curl failed to upgrade the connection to TLS when asked to.</p> </li> <li> <p>Sending the data requires a rewind that failed. In some situations curl needs to rewind in order to send the data again and if this cannot be done, the operation fails.</p> </li> <li> <p>Failed to initialize the OpenSSL SSL Engine. This can only happen when OpenSSL is used and would signify a serious internal problem.</p> </li> <li> <p>The username, password, or similar was not accepted and curl failed to log in. Verify that the credentials are provided correctly and that they are encoded the right way.</p> </li> <li> <p>File not found on TFTP server.</p> </li> <li> <p>Permission problem on TFTP server.</p> </li> <li> <p>Out of disk space on TFTP server.</p> </li> <li> <p>Illegal TFTP operation.</p> </li> <li> <p>Unknown TFTP transfer ID.</p> </li> <li> <p>File already exists (TFTP).</p> </li> <li> <p>No such user (TFTP).</p> </li> <li> <p><strong>Not used</strong></p> </li> <li> <p><strong>Not used</strong></p> </li> <li> <p>Problem with reading the SSL CA cert. The default or specified CA cert bundle could not be read/used to verify the server certificate.</p> </li> <li> <p>The resource (file) referenced in the URL does not exist.</p> </li> <li> <p>An unspecified error occurred during the SSH session. This sometimes indicates an incompatibility problem between the SSH libcurl curl uses and the SSH version used by the server curl speaks to.</p> </li> <li> <p>Failed to shut down the SSL connection.</p> </li> <li> <p><strong>Not used</strong></p> </li> <li> <p>Could not load CRL file, missing or wrong format</p> </li> <li> <p>TLS certificate issuer check failed. The most common reason for this is that the server did not send the proper intermediate certificate in the TLS handshake.</p> </li> <li> <p>The FTP <code>PRET</code> command failed. This is a non-standard command and far from all servers support it.</p> </li> <li> <p>RTSP: mismatch of CSeq numbers</p> </li> <li> <p>RTSP: mismatch of Session Identifiers</p> </li> <li> <p>Unable to parse FTP file list. The FTP directory listing format used by the server could not be parsed by curl. FTP wildcards can not be used on this server.</p> </li> <li> <p>FTP chunk callback reported error</p> </li> <li> <p>No connection available, the session is queued</p> </li> <li> <p>SSL public key does not match pinned public key. Either you provided a bad public key, or the server has changed.</p> </li> <li> <p>Invalid SSL certificate status. The server did not provide a proper valid certificate in the TLS handshake.</p> </li> <li> <p>Stream error in HTTP/2 framing layer. This is usually an unrecoverable error, but trying to force curl to speak HTTP/1 instead might circumvent it.</p> </li> <li> <p>An API function was called from inside a callback. If the curl tool returns this, something has gone wrong internally</p> </li> <li> <p>Authentication error.</p> </li> <li> <p>HTTP/3 layer error. This is somewhat generic and can be one out of several problems, see the error message for details.</p> </li> <li> <p>QUIC connection error. This error may be caused by an TLS library error. QUIC is the transport protocol used for HTTP/3.</p> </li> <li> <p>Proxy handshake error. Usually that means that a SOCKS proxy did not play along.</p> </li> <li> <p>A TLS client certificate is required but was not provided.</p> </li> <li> <p>An internal call to poll() or select() returned error that is not recoverable.</p> </li> </ol> <h2 id="error-message"><a class="header" href="#error-message">Error message</a></h2> <p>When curl exits with a non-zero code, it also outputs an error message (unless <code>--silent</code> is used). That error message may add some additional information or circumstances to the exit status number itself so the same error number can get different error messages.</p> <p>Users can also craft their own error messages with <a href="../usingcurl/verbose/writeout.html">--write-out</a>. The pseudo variable <code>%{onerror}</code> allows you to set a message that only gets displayed on errors, and it offers <code>%{errormsg}</code> and <code>%{exitcode}</code> among all the variables.</p> <p>For example:</p> <pre><code>curl --write-out "%{onerror}curl says: (%{exitcode}) %{errormsg}" \ https://curl.se/ </code></pre> <h2 id="not-used"><a class="header" href="#not-used">"Not used"</a></h2> <p>The list of exit codes above contains a number of values marked as 'not used'. Those are exit status codes that are not used in modern versions of curl but that have been used or were intended to be used in the past. They may be used in a future version of curl.</p> <p>Additionally, the highest used error status in this list is 99, but future curl versions might have added more exit codes after that number.</p> </main> <nav class="nav-wrapper" aria-label="Page navigation"> <!-- Mobile navigation buttons --> <a rel="prev" href="../cmdline/curlver.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left"> <i class="fa fa-angle-left"></i> </a> <a rel="next prefetch" href="../cmdline/copyas.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right"> <i class="fa fa-angle-right"></i> </a> <div style="clear: both"></div> </nav> </div> </div> <nav class="nav-wide-wrapper" aria-label="Page navigation"> <a rel="prev" href="../cmdline/curlver.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left"> <i class="fa fa-angle-left"></i> </a> <a rel="next prefetch" href="../cmdline/copyas.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right"> <i class="fa fa-angle-right"></i> </a> </nav> </div> <script> window.playground_copyable = true; </script> <script src="../elasticlunr.min.js"></script> <script src="../mark.min.js"></script> <script src="../searcher.js"></script> <script src="../clipboard.min.js"></script> <script src="../highlight.js"></script> <script src="../book.js"></script> <!-- Custom JS scripts --> </div> </body> </html>