Skip to content

Latest commit

 

History

History
65 lines (44 loc) · 2.82 KB

File metadata and controls

65 lines (44 loc) · 2.82 KB
  • HOWTO Download file curl -O --remote-name -C - --continue-at - -L --location --url http://your.tld/your.file Wget
  • HOWTO View sent/received headers curl -v --verbose -I --head --url http://wikipedia.org
  • HOWTO Without progress bar curl -s --silent --url https://api.github.com/repos/tomnomnom/gron/commits?per_page=1
  • HOWTO Only headers curl -I --head --url http://your.tld 3737298796
  • HOWTO FIXME POST * *
  • HOWTO Custom certificate curl --request POST https://your.tld/your/path --cacert certs/ca.crt --cert certs/server.crt --key certs/server.key
  • HOWTO Ignore certificate curl --insecure https://your.tld Disable certificate verification 2626545445

HOWTO POST Key-values

curl --request POST \
     --header "Content-Type: application/x-www-form-urlencoded" \
     --data "foo=123&bar=xyz" \
     --url http://your.tld

HOWTO POST JSON

curl -X POST --request POST \
     -H "Content-Type: application/json" --header "Content-Type: application/json" \
     -d '{"foo":123,"bar":"xyz"}' --data '{"foo":123,"bar":"xyz"}' \
     --url http://your.tld

HOWTO Gzipped 3168698307

curl --header "Accept-encoding: gzip" --url http://your.tld | gunzip
curl --compressed --url http://your.tld

HOWTO Follow redirect

curl -L --location --url http://your.tld

HOWTO Download output to file

curl -o file.tar.gz --output file.tar.gz
     --url https://your.tld/path/to/file.tar.gz

HOWTO Resume failed download 1443426446

curl -O --remote-name -C - --continue-at - --url http://your.tld/your.file

HOWTO Accept header accept JSON response

curl -v --verbose \
     -H "Accept: application/json" --header "Accept: application/json" \
     --url http://your.tld

HOWTO Other

curl -v --verbose -X HEAD --request HEAD --url http://your.tld