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
15059a34
...
15059a346a9f7379ffe58c9388aa2e081d5b825e
authored
2012-06-05 11:36:31 +0200
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
git ci -a -mrefs
1 parent
3d2cbd5f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
modules/casper.js
modules/casper.js
View file @
15059a3
...
...
@@ -760,10 +760,16 @@ Casper.prototype.mouseEvent = function mouseEvent(type, selector) {
};
/**
* Performs an HTTP request.
* Performs an HTTP request, with optional settings.
*
* Available settings are:
*
* - String method: The HTTP method to use
* - Object data: The data to use to perform the request, eg. {foo: 'bar'}
* - Array headers: An array of request headers, eg. [{'Cache-Control': 'max-age=0'}]
*
* @param String location The url to open
* @param Object settings The request settings
* @param Object settings The request settings
(optional)
* @return Casper
*/
Casper
.
prototype
.
open
=
function
open
(
location
,
settings
)
{
...
...
@@ -809,7 +815,8 @@ Casper.prototype.open = function open(location, settings) {
this
.
log
(
f
(
'opening url: %s, HTTP %s'
,
this
.
requestUrl
,
settings
.
method
.
toUpperCase
()),
"debug"
);
this
.
page
.
openUrl
(
this
.
requestUrl
,
{
operation
:
settings
.
method
,
data
:
settings
.
data
data
:
settings
.
data
,
headers
:
settings
.
headers
||
{}
},
this
.
page
.
settings
);
this
.
resources
=
[];
return
this
;
...
...
Please
register
or
sign in
to post a comment