<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Curl on Cheat Sheet</title><link>/tags/curl/</link><description>Recent content in Curl on Cheat Sheet</description><generator>Hugo</generator><language>en</language><lastBuildDate>Sun, 24 May 2026 00:00:00 +0000</lastBuildDate><atom:link href="/tags/curl/index.xml" rel="self" type="application/rss+xml"/><item><title>curl</title><link>/network/cli/curl/</link><pubDate>Sun, 24 May 2026 00:00:00 +0000</pubDate><guid>/network/cli/curl/</guid><description>&lt;h1 id="curl"&gt;&lt;code&gt;curl&lt;/code&gt;&lt;a class="anchor" href="#curl"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id="main-arguments"&gt;Main Arguments&lt;a class="anchor" href="#main-arguments"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;-o, --output &amp;lt;file&amp;gt;&lt;/code&gt;&lt;/strong&gt;: Write output to a specific file.
&lt;ul&gt;
&lt;li&gt;Useful when the response is binary or too verbose to display in the terminal.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;cf. &lt;code&gt;wget&lt;/code&gt;&lt;/strong&gt;: &lt;code&gt;-O, --output-document&lt;/code&gt; is for the response body, while &lt;code&gt;-o, --output-file&lt;/code&gt; redirects log messages.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;-w, --write-out &amp;lt;format&amp;gt;&lt;/code&gt;&lt;/strong&gt;: Display information on stdout after a completed transfer.
&lt;ul&gt;
&lt;li&gt;Useful for extracting specific metadata like HTTP status codes. Refer to &lt;code&gt;man curl&lt;/code&gt; and search for &lt;code&gt;/-w&lt;/code&gt; or &lt;code&gt;/--write-out&lt;/code&gt; for the full list of variables.&lt;/li&gt;
&lt;li&gt;eg. &lt;code&gt;curl example.com -o /dev/null -w '%{http_code}\n'&lt;/code&gt;, Checks the HTTP status code without printing the response body.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="authn"&gt;AuthN&lt;a class="anchor" href="#authn"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;blockquote class="book-hint info" &gt;
&lt;p&gt;The HTTP header is named &lt;code&gt;Authorization&lt;/code&gt;, but it is technically used for &lt;strong&gt;AuthN&lt;/strong&gt;—identifying who you are—rather than &lt;strong&gt;AuthZ&lt;/strong&gt;.&lt;/p&gt;</description></item></channel></rss>