{"id":78706,"date":"2025-07-30T17:40:34","date_gmt":"2025-07-30T16:40:34","guid":{"rendered":"https:\/\/proxidize.com\/?post_type=blog&#038;p=78706"},"modified":"2025-10-02T11:48:04","modified_gmt":"2025-10-02T10:48:04","slug":"what-is-curl","status":"publish","type":"blog","link":"https:\/\/proxidize.com\/blog\/what-is-curl\/","title":{"rendered":"What is cURL?"},"content":{"rendered":"\n<p>cURL, short for Client URL, is <strong>a command-line tool used to send and receive data from servers<\/strong> using a wide variety of protocols. It\u2019s built on a library called libcurl and supports protocols like HTTP, HTTPS, FTP, SMTP, LDAP, and more.<\/p>\n\n\n\n<p>Whether you\u2019re calling an API, downloading a file, or uploading data, <strong><a href=\"https:\/\/curl.se\/docs\/tutorial.html\" target=\"_blank\" rel=\"noopener\">cURL<\/a> provides a quick way to communicate with remote servers<\/strong> \u2014 and all of that from a terminal.<\/p>\n\n\n\n<div style=\"height:24px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large is-resized centered\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"536\" src=\"https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/what-can-curl-do-1024x536.jpg\" alt=\"An icon of a shell terminal under the title &quot;What Can cURL Do?&quot;\" class=\"wp-image-78717\" style=\"object-fit:cover\" srcset=\"https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/what-can-curl-do-1024x536.jpg 1024w, https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/what-can-curl-do-300x157.jpg 300w, https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/what-can-curl-do-768x402.jpg 768w, https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/what-can-curl-do-600x314.jpg 600w, https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/what-can-curl-do.jpg 1200w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<div style=\"height:24px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">What Can cURL Do?<\/h2>\n\n\n\n<p>cURL is a powerful tool to work with. Here are some of the things it can do:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Make HTTP requests (GET, POST, PUT, DELETE, etc.)<\/li>\n\n\n\n<li>Send and receive data (form data, JSON, XML, files)<\/li>\n\n\n\n<li>Add <a href=\"https:\/\/proxidize.com\/blog\/curl-show-response-headers\/\">headers<\/a>, authentication, and cookies to your requests<\/li>\n\n\n\n<li>Handle rate limits and redirects<\/li>\n\n\n\n<li>Work with <a href=\"https:\/\/proxidize.com\/blog\/curl-with-proxies\/\">proxy servers<\/a> (HTTP, HTTPS, SOCKS4, SOCKS5)<\/li>\n\n\n\n<li>Upload or download files over FTP\/SFTP<\/li>\n<\/ul>\n\n\n\n<div style=\"height:24px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large is-resized centered\"><img decoding=\"async\" width=\"1024\" height=\"536\" src=\"https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/where-is-curl-used-1024x536.jpg\" alt=\"A drawing of a laptop under the title &quot;Where is cURL Used?&quot;\" class=\"wp-image-78719\" style=\"object-fit:cover\" srcset=\"https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/where-is-curl-used-1024x536.jpg 1024w, https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/where-is-curl-used-300x157.jpg 300w, https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/where-is-curl-used-768x402.jpg 768w, https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/where-is-curl-used-600x314.jpg 600w, https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/where-is-curl-used.jpg 1200w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<div style=\"height:24px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Where is cURL Used?<\/h2>\n\n\n\n<p>cURL is used across a wide range of environments and workflows:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Developers use it to test and interact with <a href=\"https:\/\/www.redhat.com\/en\/topics\/api\/what-is-a-rest-api\" target=\"_blank\" rel=\"noopener\">REST APIs<\/a><\/li>\n\n\n\n<li>QA testers use it to validate HTTP responses<\/li>\n\n\n\n<li>SEO professionals use it to inspect headers and site performance<\/li>\n\n\n\n<li>IoT engineers use it in devices that need lightweight HTTP communication<\/li>\n<\/ul>\n\n\n\n<p>cURL comes pre-installed on most Linux and macOS systems, making it a go-to tool in backend and DevOps.<\/p>\n\n\n\n<div style=\"height:24px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large is-resized centered\"><img decoding=\"async\" width=\"1024\" height=\"536\" src=\"https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/why-curl-is-popular-1024x536.jpg\" alt=\"A drawing of a snail under the title &quot;Why cURL is so Popular&quot;.\" class=\"wp-image-78720\" style=\"object-fit:cover\" srcset=\"https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/why-curl-is-popular-1024x536.jpg 1024w, https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/why-curl-is-popular-300x157.jpg 300w, https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/why-curl-is-popular-768x402.jpg 768w, https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/why-curl-is-popular-600x314.jpg 600w, https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/why-curl-is-popular.jpg 1200w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<div style=\"height:24px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Why cURL Is So Popular<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>It\u2019s fast, lightweight, and doesn&#8217;t require a GUI<\/li>\n\n\n\n<li>Works in any shell or script (Linux, macOS, Windows, CI\/CD)<\/li>\n\n\n\n<li>Supports over 20 protocols<\/li>\n\n\n\n<li><a href=\"https:\/\/opensource.com\/resources\/what-open-source\" target=\"_blank\" rel=\"noopener\">Open-source<\/a> and very large community for support<\/li>\n\n\n\n<li>The number one tool for automation and testing<\/li>\n<\/ul>\n\n\n\n<div style=\"height:24px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large is-resized centered\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"536\" src=\"https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/how-to-install-curl-1024x536.jpg\" alt=\"A screenshot of a terminal window under the title &quot;How to Check or Install cURL&quot;.\" class=\"wp-image-78715\" style=\"object-fit:cover\" srcset=\"https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/how-to-install-curl-1024x536.jpg 1024w, https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/how-to-install-curl-300x157.jpg 300w, https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/how-to-install-curl-768x402.jpg 768w, https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/how-to-install-curl-600x314.jpg 600w, https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/how-to-install-curl.jpg 1200w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<div style=\"height:24px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">How to Check or Install cURL<\/h2>\n\n\n\n<p>Check if installed you should run:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e0def4;--cbp-line-number-width:calc(1 * 0.6 * .75rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e0def4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>curl --version<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki rose-pine-moon\" style=\"background-color: #232136\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #EA9A97\">curl<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #3E8FB0\">--version<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div style=\"height:12px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>That displays the installed version (e.g. curl 8.5.0), supported protocols, and <a href=\"https:\/\/curl.se\/libcurl\/\" target=\"_blank\" rel=\"noopener\">libcurl<\/a> details.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Install on Linux<\/strong><\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e0def4;--cbp-line-number-width:calc(1 * 0.6 * .75rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e0def4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>sudo apt update &amp;&amp; sudo apt install curl #Debian\/Ubuntu\nsudo yum install curl #RHEL\/CentOS<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki rose-pine-moon\" style=\"background-color: #232136\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #EA9A97\">sudo<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #F6C177\">apt<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #F6C177\">update<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #908CAA\">&amp;&amp;<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #EA9A97\">sudo<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #F6C177\">apt<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #F6C177\">install<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #F6C177\">curl<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #908CAA; font-style: italic\">#<\/span><span style=\"color: #6E6A86; font-style: italic\">Debian\/Ubuntu<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EA9A97\">sudo<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #F6C177\">yum<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #F6C177\">install<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #F6C177\">curl<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #908CAA; font-style: italic\">#<\/span><span style=\"color: #6E6A86; font-style: italic\">RHEL\/CentOS<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div style=\"height:12px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>MacOs<\/strong><\/h3>\n\n\n\n<p>Pre-installed, but you can update via <a href=\"https:\/\/brew.sh\/\" target=\"_blank\" rel=\"noopener\">Homebrew<\/a>:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e0def4;--cbp-line-number-width:calc(1 * 0.6 * .75rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e0def4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>brew install curl<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki rose-pine-moon\" style=\"background-color: #232136\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #EA9A97\">brew<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #F6C177\">install<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #F6C177\">curl<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div style=\"height:12px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Windows<\/strong><\/h3>\n\n\n\n<p>Use built-in curl.exe in Windows 10+ or install via the <a href=\"https:\/\/curl.se\/windows\/\" target=\"_blank\" rel=\"noopener\">official curl site<\/a>.<\/p>\n\n\n\n<div style=\"height:24px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large is-resized centered\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"536\" src=\"https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/how-to-use-curl-1024x536.jpg\" alt=\"A screenshot of a program under the title &quot;How to Use cURL: Common Examples&quot;.\" class=\"wp-image-78716\" style=\"object-fit:cover\" srcset=\"https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/how-to-use-curl-1024x536.jpg 1024w, https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/how-to-use-curl-300x157.jpg 300w, https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/how-to-use-curl-768x402.jpg 768w, https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/how-to-use-curl-600x314.jpg 600w, https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/how-to-use-curl.jpg 1200w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<div style=\"height:24px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">How to Use cURL: Common Examples<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Simple GET Request<\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e0def4;--cbp-line-number-width:calc(1 * 0.6 * .75rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e0def4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>curl https:\/\/example.com<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki rose-pine-moon\" style=\"background-color: #232136\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #EA9A97\">curl<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #F6C177\">https:\/\/example.com<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div style=\"height:12px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>It will print the response body to your terminal. Use -L to follow redirects.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Save Output to File<\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e0def4;--cbp-line-number-width:calc(1 * 0.6 * .75rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e0def4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>curl -o page.html https:\/\/example.com\ncurl -O https:\/\/example.com\/archive.zip<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki rose-pine-moon\" style=\"background-color: #232136\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #EA9A97\">curl<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #3E8FB0\">-o<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #F6C177\">page.html<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #F6C177\">https:\/\/example.com<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EA9A97\">curl<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #3E8FB0\">-O<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #F6C177\">https:\/\/example.com\/archive.zip<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div style=\"height:12px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Send POST Data<\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e0def4;--cbp-line-number-width:calc(1 * 0.6 * .75rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e0def4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>curl -X POST -d \"name=John&amp;age=25\" https:\/\/example.com\/form<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki rose-pine-moon\" style=\"background-color: #232136\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #EA9A97\">curl<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #3E8FB0\">-X<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #F6C177\">POST<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #3E8FB0\">-d<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #F6C177\">&quot;name=John&amp;age=25&quot;<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #F6C177\">https:\/\/example.com\/form<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div style=\"height:12px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Send JSON Data<\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e0def4;--cbp-line-number-width:calc(1 * 0.6 * .75rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e0def4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>curl -X POST \\\n-H \"Content-Type: application\/json\" \\\n-d '{\"name\":\"John\",\"email\":\"john@example.com\"}' \\\nhttps:\/\/api.example.com\/users<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki rose-pine-moon\" style=\"background-color: #232136\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #EA9A97\">curl<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #3E8FB0\">-X<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #F6C177\">POST<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #3E8FB0\">\\<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E0DEF4\">-H <\/span><span style=\"color: #F6C177\">&quot;Content-Type: application\/json&quot;<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #3E8FB0\">\\<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E0DEF4\">-d <\/span><span style=\"color: #F6C177\">&#39;{&quot;name&quot;:&quot;John&quot;,&quot;email&quot;:&quot;john@example.com&quot;}&#39;<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #3E8FB0\">\\<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E0DEF4\">https:\/\/api.example.com\/users<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div style=\"height:12px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>This sends a JSON payload to a REST API using POST requests, making it the perfect choice for testing endpoints like user form submissions and all of this directly from the terminal.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Follow Redirects<\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e0def4;--cbp-line-number-width:calc(1 * 0.6 * .75rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e0def4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>curl -L https:\/\/short.ly\/target<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki rose-pine-moon\" style=\"background-color: #232136\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #EA9A97\">curl<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #3E8FB0\">-L<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #F6C177\">https:\/\/short.ly\/target<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div style=\"height:12px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Fetch Headers Only<\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e0def4;--cbp-line-number-width:calc(1 * 0.6 * .75rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e0def4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>curl -I https:\/\/example.com<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki rose-pine-moon\" style=\"background-color: #232136\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #EA9A97\">curl<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #3E8FB0\">-I<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #F6C177\">https:\/\/example.com<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div style=\"height:12px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Using the <code>-I<\/code> flag will show you only the HTTP response headers.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Debug Requests<\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e0def4;--cbp-line-number-width:calc(1 * 0.6 * .75rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e0def4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>curl -v https:\/\/example.com<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki rose-pine-moon\" style=\"background-color: #232136\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #EA9A97\">curl<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #3E8FB0\">-v<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #F6C177\">https:\/\/example.com<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div style=\"height:12px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Useful when you\u2019re troubleshooting: <code>-v<\/code> shows request and response details for troubleshooting<\/p>\n\n\n\n<div style=\"height:24px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large is-resized centered\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"536\" src=\"https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/curl-tips-for-performance-1024x536.jpg\" alt=\"A drawing of three program windows under the title &quot;cURL Tips for Performance&quot;.\" class=\"wp-image-78714\" style=\"object-fit:cover\" srcset=\"https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/curl-tips-for-performance-1024x536.jpg 1024w, https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/curl-tips-for-performance-300x157.jpg 300w, https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/curl-tips-for-performance-768x402.jpg 768w, https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/curl-tips-for-performance-600x314.jpg 600w, https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/curl-tips-for-performance.jpg 1200w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<div style=\"height:24px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">cURL Tips for Performance<\/h2>\n\n\n\n<p>While cURL is already incredibly fast, here are a few tips to make it even more efficient:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Use <code>--compressed<\/code><\/h3>\n\n\n\n<p>If the server supports <a href=\"https:\/\/everything.curl.dev\/http\/modify\/compression.html\" target=\"_blank\" rel=\"noopener\">compression<\/a>, you can ask for compressed responses to reduce data size:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e0def4;--cbp-line-number-width:calc(1 * 0.6 * .75rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e0def4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>curl --compressed https:\/\/example.com<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki rose-pine-moon\" style=\"background-color: #232136\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #EA9A97\">curl<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #3E8FB0\">--compressed<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #F6C177\">https:\/\/example.com<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div style=\"height:12px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>This can be really helpful when dealing with large APIs responses.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Limit Redirects with <code>--max-redirs<\/code><\/h3>\n\n\n\n<p>cURL follows redirects by default (if -L is used). You can limit the number to avoid the trap of infinite loops:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e0def4;--cbp-line-number-width:calc(1 * 0.6 * .75rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e0def4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>curl -L --max-redirs 5 https:\/\/example.com<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki rose-pine-moon\" style=\"background-color: #232136\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #EA9A97\">curl<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #3E8FB0\">-L<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #3E8FB0\">--max-redirs<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #EA9A97\">5<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #F6C177\">https:\/\/example.com<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div style=\"height:12px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Reduce Output with -s<\/h3>\n\n\n\n<p>To speed up <a href=\"https:\/\/www.ibm.com\/think\/topics\/automation\" target=\"_blank\" rel=\"noopener\">automation<\/a> scripts, suppress progress and error output:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e0def4;--cbp-line-number-width:calc(1 * 0.6 * .75rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e0def4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>curl -s https:\/\/example.com<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki rose-pine-moon\" style=\"background-color: #232136\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #EA9A97\">curl<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #3E8FB0\">-s<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #F6C177\">https:\/\/example.com<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div style=\"height:12px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Use -S along with -s to still show errors:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e0def4;--cbp-line-number-width:calc(1 * 0.6 * .75rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e0def4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>curl -sS https:\/\/example.com<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki rose-pine-moon\" style=\"background-color: #232136\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #EA9A97\">curl<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #3E8FB0\">-sS<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #F6C177\">https:\/\/example.com<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div style=\"height:24px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large is-resized centered\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"536\" src=\"https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/tips-for-curl-security-1024x536.jpg\" alt=\"Images of various code blocks and padlocks under the title &quot;Tips for Security&quot;.\" class=\"wp-image-78721\" style=\"object-fit:cover\" srcset=\"https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/tips-for-curl-security-1024x536.jpg 1024w, https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/tips-for-curl-security-300x157.jpg 300w, https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/tips-for-curl-security-768x402.jpg 768w, https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/tips-for-curl-security-600x314.jpg 600w, https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/tips-for-curl-security.jpg 1200w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<div style=\"height:24px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Tips for Security<\/h2>\n\n\n\n<p>Using HTTPS is essential unless you\u2019re testing locally, avoid sending data over plain HTTP. Use HTTPS to encrypt the process.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Use <code>--cert<\/code> and <code>--key<\/code> for Secure APIs<\/h3>\n\n\n\n<p>For APIs that require SSL certificates:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e0def4;--cbp-line-number-width:calc(1 * 0.6 * .75rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e0def4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>curl --cert mycert.pem --key myKey.pem https:\/\/secure-api.com<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki rose-pine-moon\" style=\"background-color: #232136\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #EA9A97\">curl<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #3E8FB0\">--cert<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #F6C177\">mycert.pem<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #3E8FB0\">--key<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #F6C177\">myKey.pem<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #F6C177\">https:\/\/secure-api.com<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div style=\"height:12px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Be Cautious with <code>\u2013insecure<\/code><\/h3>\n\n\n\n<p>This flag disables SSL certificates verification:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e0def4;--cbp-line-number-width:calc(1 * 0.6 * .75rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e0def4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>curl --insecure https:\/\/example.com<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki rose-pine-moon\" style=\"background-color: #232136\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #EA9A97\">curl<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #3E8FB0\">--insecure<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #F6C177\">https:\/\/example.com<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div style=\"height:12px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Only <a href=\"https:\/\/proxidize.com\/blog\/curl-ignore-ssl\/\">ignore SSL<\/a> certs during testing. In production, it\u2019s dangerous and exposes you to man-in-the-middle attacks.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Don\u2019t Hardcode Tokens or Passwords<\/h3>\n\n\n\n<p>Avoid hardcoding tokens or passwords like this:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e0def4;--cbp-line-number-width:calc(1 * 0.6 * .75rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e0def4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>curl -u admin:password https:\/\/api.example.com<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki rose-pine-moon\" style=\"background-color: #232136\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #EA9A97\">curl<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #3E8FB0\">-u<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #F6C177\">admin:password<\/span><span style=\"color: #E0DEF4\"> <\/span><span style=\"color: #F6C177\">https:\/\/api.example.com<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div style=\"height:12px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Instead, use environment variables or secret managers to keep your credentials safe.<\/p>\n\n\n\n<div style=\"height:24px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large is-resized centered\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"536\" src=\"https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/curl-best-practices-1024x536.jpg\" alt=\"A drawing of a laptop with a shell terminal open under the title &quot;cURL Best Practices&quot;.\" class=\"wp-image-78712\" style=\"object-fit:cover\" srcset=\"https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/curl-best-practices-1024x536.jpg 1024w, https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/curl-best-practices-300x157.jpg 300w, https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/curl-best-practices-768x402.jpg 768w, https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/curl-best-practices-600x314.jpg 600w, https:\/\/proxidize.com\/wp-content\/uploads\/2025\/07\/curl-best-practices.jpg 1200w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<div style=\"height:24px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">cURL Best Practices<\/h2>\n\n\n\n<p>To write clean, safe, and effective cURL commands:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Always use HTTPS<\/li>\n\n\n\n<li>Keep credentials in environment variables<\/li>\n\n\n\n<li>Use <code>-sS<\/code> to suppress clutter but keep error visibility<\/li>\n\n\n\n<li>Test your requests in steps (e.g., check headers first with -I)<\/li>\n\n\n\n<li>Save reusable cURL commands in shell scripts or aliases<\/li>\n<\/ul>\n\n\n\n<div style=\"height:24px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>cURL is <strong>one of the most important tools<\/strong> for developers, DevOps engineers, testers, and system administrators. Whether you\u2019re debugging an API, scripting automation, or checking server responses, cURL gives you speed, flexibility, and control and all of that from your terminal.<\/p>\n\n\n\n<p><strong>What makes cURL special:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>It\u2019s available almost everywhere<\/li>\n\n\n\n<li>It\u2019s easy to learn<\/li>\n\n\n\n<li>It fits perfectly into automation workflows<\/li>\n\n\n\n<li>It works well with tools like <a href=\"https:\/\/medium.com\/how-tos-for-coders\/https-medium-com-how-tos-for-coders-parse-json-data-using-jq-and-curl-from-command-line-5aa8a05cd79b\" target=\"_blank\" rel=\"noopener\">jq<\/a>, bash, and CI\/CD pipelines<\/li>\n<\/ul>\n\n\n\n<p>If you haven\u2019t explored cURL yet, now is the perfect time to, and if you\u2019re already using it, there\u2019s always something new to learn!<\/p>\n","protected":false},"author":8854,"featured_media":78718,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","categories":[266],"tags":[],"class_list":["post-78706","blog","type-blog","status-publish","format-standard","has-post-thumbnail","hentry","category-tech-tutorials-and-programming"],"acf":[],"_links":{"self":[{"href":"https:\/\/proxidize.com\/wp-json\/wp\/v2\/blog\/78706","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/proxidize.com\/wp-json\/wp\/v2\/blog"}],"about":[{"href":"https:\/\/proxidize.com\/wp-json\/wp\/v2\/types\/blog"}],"author":[{"embeddable":true,"href":"https:\/\/proxidize.com\/wp-json\/wp\/v2\/users\/8854"}],"replies":[{"embeddable":true,"href":"https:\/\/proxidize.com\/wp-json\/wp\/v2\/comments?post=78706"}],"version-history":[{"count":9,"href":"https:\/\/proxidize.com\/wp-json\/wp\/v2\/blog\/78706\/revisions"}],"predecessor-version":[{"id":84760,"href":"https:\/\/proxidize.com\/wp-json\/wp\/v2\/blog\/78706\/revisions\/84760"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/proxidize.com\/wp-json\/wp\/v2\/media\/78718"}],"wp:attachment":[{"href":"https:\/\/proxidize.com\/wp-json\/wp\/v2\/media?parent=78706"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/proxidize.com\/wp-json\/wp\/v2\/categories?post=78706"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/proxidize.com\/wp-json\/wp\/v2\/tags?post=78706"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}