Working with cURL
Downloading files
Download single file
curl <url>
curl http://www.google.comOutput downloaded result to a file
curl <url> > <file>
curl http://www.google.com > google.txt
curl -o <file> <url>
curl -o google.txt http://www.google.comOutput downloaded file based on destination file name (eg. about.html)
curl -O <url>
curl -O https://www.google.com/intl/en/about.htmlFetch and output multiple files
curl -O <url1> <url2> <url3>Follow location headers
curl -L <url>
curl -L http://google.comVerbose activity information
curl -v <url>
curl -v http://www.google.comResume partially downloaded file
curl -C - -O <url>Sending requests
Send GET/POST request
curl -X <method> -H "<headers>" -d '<params>' <url>Example: Send post request for JSON content type to GraphQL endpoint
curl -X POST \
-H "Content-Type: application/json" \
-d '{"query": "{ field }"}' \
http://server/graphqlLast updated