curl: Client URL — Make HTTP requests from the command line. curl sends HTTP requests from the command line and prints the response. curl https://example.com fetches a page; curl -X POST -H 'Content-Type: application/json' -d '{"name":"Anna"}' https://api.example.com/users calls an API. It is the universal tool for testing and debugging web services. curl -I shows only the headers, curl -v shows the full conversation including TLS details, and curl -L follows redirects.
Most API documentation gives examples in curl, and browser developer tools can copy any request as a curl command. That is a handy way to reproduce a bug outside the browser. Be careful with what ends up in your shell history. Tokens passed with -H 'Authorization: ...' are saved there, so prefer reading them from an environment variable.
Use before running or suggesting shell commands with flags, especially destructive or broad ones (-f/--force, -r/-R recursive, -a/--all, -y/--yes, prune, --hard), and when a user asks what a flag means (-v, -q, -n/--dry-run, -h, -o, -p, -t, -u, -w, -x, -c, -i). Explains flags per tool and prefers dry runs and narrow scopes.
Use when an HTTP request returns an unexpected status code (4xx or 5xx, or a redirect loop), when a user pastes an error like "419 Page Expired", "422 Unprocessable Content", "502 Bad Gateway" or "CORS error", or when debugging API calls between a frontend and a Laravel/PHP or Node backend. Finds the cause from the status code, headers and logs before changing code.