https://github.com/opentable/grunt-http-poll
polls a http endpoint until it sees the desired status code
https://github.com/opentable/grunt-http-poll
Last synced: 9 months ago
JSON representation
polls a http endpoint until it sees the desired status code
- Host: GitHub
- URL: https://github.com/opentable/grunt-http-poll
- Owner: opentable
- License: mit
- Created: 2015-02-13T16:54:53.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2016-02-21T02:08:22.000Z (over 10 years ago)
- Last Synced: 2025-01-15T14:19:18.493Z (over 1 year ago)
- Language: JavaScript
- Size: 133 KB
- Stars: 0
- Watchers: 18
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# grunt-http-poll
[](https://travis-ci.org/opentable/grunt-http-poll) [](http://badge.fury.io/js/grunt-http-poll) 
Poll a http endpoint until you see the desired statuscode.
In our case we use it after issuing the stop command to keep polling until we see the server has stopped.
installation:
```npm install --save grunt-http-poll```
usage:
```
grunt.initConfig({
'http-poll':{
options: {
endpoint: 'http://myserver.com/someendpoint',
statuscode: 502, // desired status code
pollinterval: 1000, // time between requests
timeout: 60000 // if no change seen by the timeout then throw an exception
timeoutIsError: false // treat the timeout elapse as an error (fail) or not (continue), default: true
}
}
});
```