refs #137 - added a warning when trying to send custom request headers using phantom < 1.6
Showing
2 changed files
with
4 additions
and
1 deletions
... | @@ -828,6 +828,9 @@ Casper.prototype.open = function open(location, settings) { | ... | @@ -828,6 +828,9 @@ Casper.prototype.open = function open(location, settings) { |
828 | } | 828 | } |
829 | this.emit('open', this.requestUrl, settings); | 829 | this.emit('open', this.requestUrl, settings); |
830 | this.log(f('opening url: %s, HTTP %s', this.requestUrl, settings.method.toUpperCase()), "debug"); | 830 | this.log(f('opening url: %s, HTTP %s', this.requestUrl, settings.method.toUpperCase()), "debug"); |
831 | if ('headers' in settings && phantom.version.minor < 6) { | ||
832 | this.warn('Custom headers in outgoing requests are supported in PhantomJS >= 1.6'); | ||
833 | } | ||
831 | this.page.openUrl(this.requestUrl, { | 834 | this.page.openUrl(this.requestUrl, { |
832 | operation: settings.method, | 835 | operation: settings.method, |
833 | data: settings.data, | 836 | data: settings.data, | ... | ... |
-
Please register or sign in to post a comment