Skip to content

Commit

Permalink
add request url to xhrSetup callback
Browse files Browse the repository at this point in the history
  • Loading branch information
kanongil committed Dec 4, 2015
1 parent 554bc08 commit 649284f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion API.md
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ This allows user to easily modify/setup XHR. see example below.
```js
var config = {
xhrSetup: function(xhr) {
xhrSetup: function(xhr, url) {
xhr.withCredentials = true; // do send cookies
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/utils/xhr-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class XhrLoader {
this.stats.tfirst = null;
this.stats.loaded = 0;
if (this.xhrSetup) {
this.xhrSetup(xhr);
this.xhrSetup(xhr, this.url);
}
xhr.send();
}
Expand Down

0 comments on commit 649284f

Please sign in to comment.