Skip to content

Commit

Permalink
documentation for 'add performance check (maxDuration)'
Browse files Browse the repository at this point in the history
  • Loading branch information
hgoebl committed May 1, 2012
1 parent 4249ad4 commit 5f13ed0
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Readme.md
Expand Up @@ -40,6 +40,19 @@ pin('http://google.com/')
}) })
``` ```


Check if response is back under maximum duration:

```js
var pin = require('pin');

pin('http://google.com/')
.interval(10000) // in ms
.maxDuration(800) // in ms
.up(function(response, info) {
console.log(response, info.duration);
})
```

Register custom validator: Register custom validator:


```js ```js
Expand Down Expand Up @@ -79,6 +92,7 @@ pin('http://google.com/')
- Super minimalistic api - Super minimalistic api
- Custom validators - Custom validators
- Check if text is present in the body - Check if text is present in the body
- Check response time
- Custom headers - Custom headers


## Tests ## Tests
Expand Down

0 comments on commit 5f13ed0

Please sign in to comment.