Is there a way to get the size of a curl
request programmatically?
E.g. if I do
curl 'http://www.example.com/url' \
-H 'Cookie: cookie=cookiedata;' \
-H 'X-CSRFToken: csrffake' \
--data 'example=moredata \
--compressed
I want to know how big my sent request is?
Best Answer
Ok after some
man curl
digging, I think I've found out the answer, though I'm not 100% sure about it's validity:That means adding a
-w '%{size_request} %{size_upload}'
and then adding the resulting numbers in the output after the request will give you the request size in total.