updated doclink
Showing
2 changed files
with
18 additions
and
1 deletions
... | @@ -44,6 +44,23 @@ $ casperjs dump-headers.js | ... | @@ -44,6 +44,23 @@ $ casperjs dump-headers.js |
44 | } | 44 | } |
45 | ``` | 45 | ``` |
46 | 46 | ||
47 | To fetch a particular header by its name: | ||
48 | |||
49 | ```javascript | ||
50 | require('casper').create().start('http://www.google.fr/', function(response) { | ||
51 | this.echo(response.headers.get('Date')); | ||
52 | }).run(); | ||
53 | ``` | ||
54 | |||
55 | That gives: | ||
56 | |||
57 | ```javascript | ||
58 | $ casperjs dump-single-header.js | ||
59 | Thu, 18 Oct 2012 08:26:34 GMT | ||
60 | ``` | ||
61 | |||
62 | The documentation has been [updated accordingly](http://casperjs.org/api.html#casper.then.callbacks). | ||
63 | |||
47 | ### Bugfixes & enhancements | 64 | ### Bugfixes & enhancements |
48 | 65 | ||
49 | - [Casper.resourceExists()](http://casperjs.org/api.html#casper.resourceExists) and related functions now checks for non HTTP-404 received responses. | 66 | - [Casper.resourceExists()](http://casperjs.org/api.html#casper.resourceExists) and related functions now checks for non HTTP-404 received responses. | ... | ... |
-
Please register or sign in to post a comment