Get the size of a HTTP response
Vanilla verison:
curl "https://foo.bar/file" -w 'size: %{size_download}\n' -o /dev/null
or with a little extra flourish:
curl "https://foo.bar/file" -w 'size: %{size_download}\n' -o /dev/null | sed 's/[^0-9]//g' | numfmt --to=iec