I was deubgging some http requests and found that I can grab request headers in this type of format:
GET /download?123456:75b3c682a7c4db4cea19641b33bec446/document.docx HTTP/1.1
Host: www.site.com
User-Agent: Mozilla/5.0 Gecko/2010 Firefox/5
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Referer: http://www.site.com/dc/517870b8cc7
Cookie: lang=us; reg=1787081http%3A%2F%2Fwww.site.com%2Fdc%2F517870b8cc7
Is it possible or is there an easy way to reconstruct that request using wget or curl (or another CLI tool?)
From reading the wget manual page I know I can set several of these things individually, but is there an easier way to send a request with all these variables from the command line?
Yes, you just need to combine all the headers using
--headerIf you are trying to do some illegal download,
it might fail,
is depends on how hosting URL being programmed