curl
Transfers data from or to a server. Supports most protocols, including HTTP, HTTPS, FTP, SCP, etc. See also: `wcurl`, `wget`.
More info →Options (10)
-L, --locationbooleanMake an HTTP GET request, follow any `3xx` redirects, and dump the reply headers and contents to `stdout`
curl {{[-L|--location]}} {{[-D|--dump-header]}} - {{https://example.com}}-D, --dump-headerbooleanMake an HTTP GET request, follow any `3xx` redirects, and dump the reply headers and contents to `stdout`
curl {{[-L|--location]}} {{[-D|--dump-header]}} - {{https://example.com}}-O, --remote-namebooleanDownload a file, saving the output under the filename indicated by the URL
curl {{[-O|--remote-name]}} {{https://example.com/filename.zip}}-X, --requestbooleanSend form-encoded data (POST request of type `application/x-www-form-urlencoded`). Use `--data @file_name` or `--data @'-'` to read from `stdin`
curl {{[-X|--request]}} POST {{[-d|--data]}} '{{name=bob}}' {{http://example.com/form}}-d, --databooleanSend form-encoded data (POST request of type `application/x-www-form-urlencoded`). Use `--data @file_name` or `--data @'-'` to read from `stdin`
curl {{[-X|--request]}} POST {{[-d|--data]}} '{{name=bob}}' {{http://example.com/form}}-k, --insecurebooleanSend a request with an extra header, using a custom HTTP method and over a proxy (such as BurpSuite), ignoring insecure self-signed certificates
curl {{[-k|--insecure]}} {{[-x|--proxy]}} {{http://127.0.0.1:8080}} {{[-H|--header]}} '{{Authorization: Bearer token}}' {{[-X|--request]}} {{GET|PUT|POST|DELETE|PATCH|...}} {{https://example.com}}-x, --proxybooleanSend a request with an extra header, using a custom HTTP method and over a proxy (such as BurpSuite), ignoring insecure self-signed certificates
curl {{[-k|--insecure]}} {{[-x|--proxy]}} {{http://127.0.0.1:8080}} {{[-H|--header]}} '{{Authorization: Bearer token}}' {{[-X|--request]}} {{GET|PUT|POST|DELETE|PATCH|...}} {{https://example.com}}-H, --headerbooleanSend a request with an extra header, using a custom HTTP method and over a proxy (such as BurpSuite), ignoring insecure self-signed certificates
curl {{[-k|--insecure]}} {{[-x|--proxy]}} {{http://127.0.0.1:8080}} {{[-H|--header]}} '{{Authorization: Bearer token}}' {{[-X|--request]}} {{GET|PUT|POST|DELETE|PATCH|...}} {{https://example.com}}-E, --certbooleanPass client certificate and private key for the request, skipping certificate validation
curl {{[-E|--cert]}} {{client.pem}} --key {{key.pem}} {{[-k|--insecure]}} {{https://example.com}}-v, --verbosebooleanResolve a hostname to a custom IP address, with verbose output (similar to editing the `/etc/hosts` file for custom DNS resolution)
curl {{[-v|--verbose]}} --resolve {{example.com}}:{{80}}:{{127.0.0.1}} {{http://example.com}}Examples (8)
Make an HTTP GET request and dump the contents in `stdout`
curl https://example.comMake an HTTP GET request, follow any `3xx` redirects, and dump the reply headers and contents to `stdout`
curl [-L|--location] [-D|--dump-header] - https://example.comDownload a file, saving the output under the filename indicated by the URL
curl [-O|--remote-name] https://example.com/filename.zipSend form-encoded data (POST request of type `application/x-www-form-urlencoded`). Use `--data @file_name` or `--data @'-'` to read from `stdin`
curl [-X|--request] POST [-d|--data] 'name=bob' http://example.com/formSend a request with an extra header, using a custom HTTP method and over a proxy (such as BurpSuite), ignoring insecure self-signed certificates
curl [-k|--insecure] [-x|--proxy] http://127.0.0.1:8080 [-H|--header] 'Authorization: Bearer token' [-X|--request] GET|PUT|POST|DELETE|PATCH|... https://example.comSend data in JSON format, specifying the appropriate Content-Type header
curl [-d|--data] '{"name":"bob"}' [-H|--header] 'Content-Type: application/json' http://example.com/users/1234Pass client certificate and private key for the request, skipping certificate validation
curl [-E|--cert] client.pem --key key.pem [-k|--insecure] https://example.comResolve a hostname to a custom IP address, with verbose output (similar to editing the `/etc/hosts` file for custom DNS resolution)
curl [-v|--verbose] --resolve example.com:80:127.0.0.1 http://example.com