Master cURL performance profiling and network debugging. Learn how to extract microsecond connection timings with -w, inspect TLS handshake steps with -v and --trace, and identify API bottlenecks.
Frequently Asked Questions
Q1. What do the >, <, and symbols mean in curl -v output?
indicates informational messages generated by cURL (e.g. DNS resolution, TLS handshake). > indicates data and headers sent by your client to the server. < indicates data and headers received back from the server.
Q2. How do I measure Time to First Byte (TTFB) using cURL?
Run: curl -s -o /dev/null -w "TTFB: %{time_starttransfer}s\n" https://example.com.
Q3. How do I only output the HTTP status code from cURL in a bash script?
Use: curl -s -o /dev/null -w "%{http_code}" https://api.example.com.
Q4. What is the difference between time_connect and time_appconnect?
time_connect is the time it took to complete the TCP 3-way handshake. time_appconnect is the cumulative time until the SSL/TLS cryptographic handshake was fully negotiated.