poll a http endpoint until the desired statuscode is seen
npm install grunt-http-pollPoll 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
}
}
});
``