A little IoT server returns a file, whose name is given by current date and time, to make it unique. The format is 2018.07.04.18.22.45.dat.
Asking for address XX.XX.XX.XX:5001/read in a browser (with browser cache disabled) the file is returned with its original name.
Using wget, alas, I cannot preserve the file name:
wget XX.XX.XX.XX:5001/read returns the proper content but with name read, read.1, read.2, etc.
Is there the possibility to collect it keeping the name, using wget or other commands?
ADDENDUM: using curl XX.XX.XX.XX:5001/read I obtain the raw content instead of the file.
ADDENDUM: as a imperfect workaround, I can generate a filename based on timestamp with wget -o $(date "+%Y.%m.%d-%H.%M.%S.%N.dat") XX.XX.XX.XX:5001/read. Of course it doesn't match the original filename.
--trust-server-namesoption?read.Xanyway...--content-dispositionoption?