<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fr">
	<id>https://knowledge.pinon-hebert.fr/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Curl</id>
	<title>Curl - Historique des versions</title>
	<link rel="self" type="application/atom+xml" href="https://knowledge.pinon-hebert.fr/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Curl"/>
	<link rel="alternate" type="text/html" href="https://knowledge.pinon-hebert.fr/mediawiki/index.php?title=Curl&amp;action=history"/>
	<updated>2026-05-19T18:10:55Z</updated>
	<subtitle>Historique des versions pour cette page sur le wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://knowledge.pinon-hebert.fr/mediawiki/index.php?title=Curl&amp;diff=1250&amp;oldid=prev</id>
		<title>Jpinon le 19 septembre 2025 à 15:55</title>
		<link rel="alternate" type="text/html" href="https://knowledge.pinon-hebert.fr/mediawiki/index.php?title=Curl&amp;diff=1250&amp;oldid=prev"/>
		<updated>2025-09-19T15:55:10Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;fr&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Version précédente&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version du 19 septembre 2025 à 15:55&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Ligne 1 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 1 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;J&#039;aime beaucoup curl. Avant j&#039;étais fan de [[wget]] mais finalement curl y&#039;a que ça de vrai!&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Un des problème que j&#039;ai rencontré avec cet outil somme toute simple c&#039;est la possibilité de sauvegarder les résultats dans un fichier ET de récupérer simplement le code retour HTTP. Si on utilise le standard -i pour avoir l&#039;en-tête et qu&#039;on utilise -o pour envoyer le résultat dans un fichier on se retrouve avec le header dans le fichier de sortie. Moi c&#039;etait un ZIP ça posait des problèmes.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;J&#039;ai demandé a mon ami copilot et il m&#039;a fait découvrir l&#039;option -w. &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Le lui laisse prendre la suite. Il est plus sérieux que moi dans sa rédaction!&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= Utilisation de l&amp;#039;option -w avec curl =&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= Utilisation de l&amp;#039;option -w avec curl =&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;L&#039;option &amp;lt;code&amp;gt;-w&amp;lt;/code&amp;gt; (ou &amp;lt;code&amp;gt;--write-out&amp;lt;/code&amp;gt;) de &amp;lt;code&amp;gt;curl&amp;lt;/code&amp;gt; permet d&#039;extraire des informations spécifiques sur la requête HTTP, comme le code de retour, le type de contenu, les temps de connexion, etc., &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;**&lt;/del&gt;sans affecter le fichier de sortie&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;** &lt;/del&gt;défini par &amp;lt;code&amp;gt;-o&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;L&#039;option &amp;lt;code&amp;gt;-w&amp;lt;/code&amp;gt; (ou &amp;lt;code&amp;gt;--write-out&amp;lt;/code&amp;gt;) de &amp;lt;code&amp;gt;curl&amp;lt;/code&amp;gt; permet d&#039;extraire des informations spécifiques sur la requête HTTP, comme le code de retour, le type de contenu, les temps de connexion, etc., &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;&#039;&lt;/ins&gt;sans affecter le fichier de sortie&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;&#039; &lt;/ins&gt;défini par &amp;lt;code&amp;gt;-o&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Syntaxe de base ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Syntaxe de base ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;curl -s -o out/parse.zip -w &quot;%{http_code}\n&quot; -F &quot;file=@in/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;PE&lt;/del&gt;.pdf&quot; &#039;https://example.com/upload&#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;curl -s -o out/parse.zip -w &quot;%{http_code}\n&quot; -F &quot;file=@in/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;exemple&lt;/ins&gt;.pdf&quot; &#039;https://example.com/upload&#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key knowledge:diff:1.41:old-1249:rev-1250:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Jpinon</name></author>
	</entry>
	<entry>
		<id>https://knowledge.pinon-hebert.fr/mediawiki/index.php?title=Curl&amp;diff=1249&amp;oldid=prev</id>
		<title>Jpinon : Page créée avec « = Utilisation de l&#039;option -w avec curl =  L&#039;option &lt;code&gt;-w&lt;/code&gt; (ou &lt;code&gt;--write-out&lt;/code&gt;) de &lt;code&gt;curl&lt;/code&gt; permet d&#039;extraire des informations spécifiques sur la requête HTTP, comme le code de retour, le type de contenu, les temps de connexion, etc., **sans affecter le fichier de sortie** défini par &lt;code&gt;-o&lt;/code&gt;.  == Syntaxe de base == &lt;syntaxhighlight lang=&quot;bash&quot;&gt; curl -s -o out/parse.zip -w &quot;%{http_code}\n&quot; -F &quot;file=@in/PE.pdf&quot; &#039;https://example.... »</title>
		<link rel="alternate" type="text/html" href="https://knowledge.pinon-hebert.fr/mediawiki/index.php?title=Curl&amp;diff=1249&amp;oldid=prev"/>
		<updated>2025-09-19T15:49:44Z</updated>

		<summary type="html">&lt;p&gt;Page créée avec « = Utilisation de l&amp;#039;option -w avec curl =  L&amp;#039;option &amp;lt;code&amp;gt;-w&amp;lt;/code&amp;gt; (ou &amp;lt;code&amp;gt;--write-out&amp;lt;/code&amp;gt;) de &amp;lt;code&amp;gt;curl&amp;lt;/code&amp;gt; permet d&amp;#039;extraire des informations spécifiques sur la requête HTTP, comme le code de retour, le type de contenu, les temps de connexion, etc., **sans affecter le fichier de sortie** défini par &amp;lt;code&amp;gt;-o&amp;lt;/code&amp;gt;.  == Syntaxe de base == &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt; curl -s -o out/parse.zip -w &amp;quot;%{http_code}\n&amp;quot; -F &amp;quot;file=@in/PE.pdf&amp;quot; &amp;#039;https://example.... »&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nouvelle page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Utilisation de l&amp;#039;option -w avec curl =&lt;br /&gt;
&lt;br /&gt;
L&amp;#039;option &amp;lt;code&amp;gt;-w&amp;lt;/code&amp;gt; (ou &amp;lt;code&amp;gt;--write-out&amp;lt;/code&amp;gt;) de &amp;lt;code&amp;gt;curl&amp;lt;/code&amp;gt; permet d&amp;#039;extraire des informations spécifiques sur la requête HTTP, comme le code de retour, le type de contenu, les temps de connexion, etc., **sans affecter le fichier de sortie** défini par &amp;lt;code&amp;gt;-o&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Syntaxe de base ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
curl -s -o out/parse.zip -w &amp;quot;%{http_code}\n&amp;quot; -F &amp;quot;file=@in/PE.pdf&amp;quot; &amp;#039;https://example.com/upload&amp;#039;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; : mode silencieux (supprime la barre de progression).&lt;br /&gt;
* &amp;lt;code&amp;gt;-o out/parse.zip&amp;lt;/code&amp;gt; : enregistre le corps de la réponse dans le fichier.&lt;br /&gt;
* &amp;lt;code&amp;gt;-w &amp;quot;%{http_code}\n&amp;quot;&amp;lt;/code&amp;gt; : affiche le code HTTP à la fin, sans l&amp;#039;inclure dans le fichier.&lt;br /&gt;
&lt;br /&gt;
== Variables disponibles avec -w ==&lt;br /&gt;
Voici quelques variables utiles que l&amp;#039;on peut inclure dans le format de sortie :&lt;br /&gt;
&lt;br /&gt;
=== 📄 Statut HTTP ===&lt;br /&gt;
* &amp;lt;code&amp;gt;%{http_code}&amp;lt;/code&amp;gt; : code de retour HTTP (ex. 200, 404)&lt;br /&gt;
* &amp;lt;code&amp;gt;%{response_code}&amp;lt;/code&amp;gt; : identique à &amp;lt;code&amp;gt;http_code&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;%{exitcode}&amp;lt;/code&amp;gt; : code de sortie de curl&lt;br /&gt;
=== ⏱️ Temps ===&lt;br /&gt;
* &amp;lt;code&amp;gt;%{time_total}&amp;lt;/code&amp;gt; : durée totale de la requête&lt;br /&gt;
* &amp;lt;code&amp;gt;%{time_connect}&amp;lt;/code&amp;gt; : temps pour établir la connexion&lt;br /&gt;
* &amp;lt;code&amp;gt;%{time_starttransfer}&amp;lt;/code&amp;gt; : temps jusqu’au premier octet reçu&lt;br /&gt;
&lt;br /&gt;
=== 📦 Transfert ===&lt;br /&gt;
* &amp;lt;code&amp;gt;%{size_download}&amp;lt;/code&amp;gt; : taille des données téléchargées&lt;br /&gt;
* &amp;lt;code&amp;gt;%{size_upload}&amp;lt;/code&amp;gt; : taille des données envoyées&lt;br /&gt;
* &amp;lt;code&amp;gt;%{speed_download}&amp;lt;/code&amp;gt; : vitesse de téléchargement&lt;br /&gt;
&lt;br /&gt;
=== 🌐 Réseau ===&lt;br /&gt;
* &amp;lt;code&amp;gt;%{remote_ip}&amp;lt;/code&amp;gt; : IP du serveur distant&lt;br /&gt;
* &amp;lt;code&amp;gt;%{remote_port}&amp;lt;/code&amp;gt; : port du serveur distant&lt;br /&gt;
* &amp;lt;code&amp;gt;%{ssl_verify_result}&amp;lt;/code&amp;gt; : résultat de la vérification SSL&lt;br /&gt;
&lt;br /&gt;
=== 🧾 En-têtes ===&lt;br /&gt;
* &amp;lt;code&amp;gt;%{content_type}&amp;lt;/code&amp;gt; : type MIME du contenu&lt;br /&gt;
* &amp;lt;code&amp;gt;%{redirect_url}&amp;lt;/code&amp;gt; : URL de redirection (si applicable)&lt;br /&gt;
* &amp;lt;code&amp;gt;%{url_effective}&amp;lt;/code&amp;gt; : URL finale après redirections&lt;br /&gt;
&lt;br /&gt;
== Exemple complet ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
curl -s -o out/parse.zip -w &amp;quot;Code HTTP: %{http_code}\nType: %{content_type}\nDurée: %{time_total}s\n&amp;quot; \&lt;br /&gt;
     -F &amp;quot;file=@in/PE.pdf&amp;quot; &amp;#039;https://example.com/upload&amp;#039;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Astuce : rediriger la sortie -w dans un fichier séparé ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
curl -s -o out/parse.zip -w &amp;quot;%{http_code}\n&amp;quot; -F &amp;quot;file=@in/PE.pdf&amp;quot; &amp;#039;https://example.com/upload&amp;#039; &amp;gt; out/status.log&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cela permet de garder le fichier téléchargé propre, tout en enregistrant les métadonnées dans un fichier à part.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
L&amp;#039;option &amp;lt;code&amp;gt;-w&amp;lt;/code&amp;gt; est idéale pour automatiser les traitements HTTP avec &amp;lt;code&amp;gt;curl&amp;lt;/code&amp;gt;, en extrayant des informations utiles sans interférer avec le contenu téléchargé via &amp;lt;code&amp;gt;-o&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Jpinon</name></author>
	</entry>
</feed>