Troubleshooting of curl errors: Difference between revisions

Jump to navigation Jump to search
Line 170: Line 170:
% curl -XPOST http://localhost:3000/ -H "Content-Type: application/json"  -d'{"url": "https://someweb.com/Today\'s_Biggest_Trends"}'
% curl -XPOST http://localhost:3000/ -H "Content-Type: application/json"  -d'{"url": "https://someweb.com/Today\'s_Biggest_Trends"}'
dquote>
dquote>
</pre>
== How to Suppress the Progress Meter ==
When executing the curl command, the typical output includes detailed information about the download and upload process as shown below:
<pre>
% Total    % Received % Xferd  Average Speed  Time    Time    Time  Current
                                Dload  Upload  Total  Spent    Left  Speed
100 90141  100 90141    0    0  20029      0  0:00:04  0:00:04 --:--:-- 22012
</pre>
To suppress the progress meter of the curl command, you can use the {{kbd | key=<nowiki>-s</nowiki>}} (silent) option, which hides all output, or the {{kbd | key=<nowiki>-S</nowiki>}} (silent with error messages) option, which suppresses the progress meter but still displays error messages.
<pre>
curl -sS [URL]
</pre>
Alternatively, if you prefer to suppress all output including error messages, use the {{kbd | key=<nowiki>-s</nowiki>}} (silent) option alone:
<pre>
curl -s [URL]
</pre>
</pre>


Navigation menu