Permalink
Browse files

documentation for 'add performance check (maxDuration)'

  • Loading branch information...
1 parent 4249ad4 commit 5f13ed03aaf1284e46b05fd8e405159852fac9a1 @hgoebl hgoebl committed May 1, 2012
Showing with 14 additions and 0 deletions.
  1. +14 −0 Readme.md
View
@@ -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:
```js
@@ -79,6 +92,7 @@ pin('http://google.com/')
- Super minimalistic api
- Custom validators
- Check if text is present in the body
+- Check response time
- Custom headers
## Tests

0 comments on commit 5f13ed0

Please sign in to comment.