Clever Curl

2020-09-03T17:58:14Z

microblog

Anders' personal cURL cheat sheet

Uploading files

Basic (prefer --data-binary to --data/-d because it doesn't mess with newlines etc):

curl https://example.com/dir/filename.bin --data-binary @filename.bin

-T option will make a PUT request. Advantage over --data-binary is that it doesn't load the entire file into memory on the client.

curl https://example.com/dir/ -T filename.bin

Like what I have to say? Consider subscribing to my newsletter. I don't send very many updates.