wget has nice option that lets you allow downloading multiple files from same location
(I mean combination of --base
and --input-file
)
Advantage of this, is that if possible wget tries to reuse opened socket/connection.
I was wondering if it's possible to do multiple POST request using wget. (I probably end up writing it in python, as I wasn't able to find such use in wget's docs)
i.e. inside input file I would have post data (json in my case):
{"results":1}
{"results":2}
and request like:
wget --header "Content-Type: application/json" -i input.data http://example.com/api/data