1# GET an endpoint passing header options
2curl -X GET --header 'Accept: application/json' 'http://localhost:3000/api/sample'
3
4# Download Binary Files
5curl -o kubectl https://amazon-eks.s3-us-west-2.amazonaws.com/1.10.3/2018-06-05/bin/darwin/amd64/kubectl
6
7# POST
8curl -d '{"type":"ATM", "description":"Levantamento"}' -H "Content-Type: application/json" -X POST http://localhost:3232/api/ai/type
9
10# Interval CURL
11watch -n 2 curl coderecipes.org
12
13# Interval CURL with timeout
14It will probe the /health endpoint every second and timeout if it gets no response in 5 seconds.
15while true; do date && curl -m 5 http://localhost:3000/health && echo; sleep 1; done
16
17# Curl with Follow Redirects
18curl -L http://locahost/optimized-nginx
19
20# GET Headers Only
21curl -SI0 https://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.3.3/backbone-min.jsCreated on 4/29/2018