Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
casperjs
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
d6c11e45
...
d6c11e45bafb0c01cdc5a584942bef06eb9365f9
authored
2012-08-20 14:11:34 -0400
by
Chris Lorenzo
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Pass a copy of the object rather than a reference so clientutils cant modify casper.options
1 parent
9211f91f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
1 deletions
modules/casper.js
modules/casper.js
View file @
d6c11e4
...
...
@@ -455,7 +455,7 @@ Casper.prototype.die = function die(message, status) {
*/
Casper
.
prototype
.
download
=
function
download
(
url
,
targetPath
,
method
,
data
)
{
"use strict"
;
var
cu
=
require
(
'clientutils'
).
create
(
this
.
options
);
var
cu
=
require
(
'clientutils'
).
create
(
utils
.
mergeObjects
({},
this
.
options
)
);
try
{
fs
.
write
(
targetPath
,
cu
.
decode
(
this
.
base64encode
(
url
,
method
,
data
)),
'wb'
);
this
.
emit
(
'downloaded.file'
,
targetPath
);
...
...
Please
register
or
sign in
to post a comment