Skip to content

Instantly share code, notes, and snippets.

@artjomb
Created September 9, 2014 16:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save artjomb/716fa7090745725178a5 to your computer and use it in GitHub Desktop.
Save artjomb/716fa7090745725178a5 to your computer and use it in GitHub Desktop.
var casper = require('casper').create();
var url = "http://example.com/";
casper.start().thenOpen(url).then(function() {
this.download(url, "example.html");
this.page.customHeaders = {
"Accept-Language": "hu"
};
}).thenOpen(url).then(function() {
this.download(url, "example.html");
}).run(function(){
this.echo("done");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment