Hi Everyone,
At work we have a file repository website, which uses a proprietary
URL encryption. Let's say you have File A with the link
http://internal/files/429usfjsai145 when you paste this into your
browser, there is a login page. After filling in company credential, a
file save will appear. I've examined the form and it seems that
there's a javascript file that's handling the POST request and
credential validation, this same javascript also generates some
encoded text before POSTing along with the login data.
So far I've been able to login, but I don't know how to get CasperJS
to accept the response header with the file and save it to a local
directory.
Here's an example of the response header:
Cache-Control:private
Content-Disposition:attachment;filename="requested_file.zip"
Content-Length:2631615
Content-Type:application/x-zip-compressed
Date:Mon, 11 Jun 2012 01:20:43 GMT
Expires:Mon, 11 Jun 2012 01:19:42 GMT
Server:Microsoft-IIS/7.5
X-AspNet-Version:2.0.50727
X-Powered-By:
ASP.NET
Any tip you can provide is greatly appreciated!!!