sanathp / statusok

Monitor your Website and APIs from your Computer. Get Notified through Slack, E-mail when your server is down or response time is more than expected.
Other
1.62k stars 197 forks source link

add new Feature for response body contains String #60

Closed lmiz2 closed 1 year ago

lmiz2 commented 4 years ago

new feature contains(or not contains)

config.json

... "requests":[ { "url":"http://localhost:5500", "requestType":"GET", "headers":{ }, "params":{ }, "checkEvery":5, "responseCode":200, "responseTime":800, "checkResponseBody" : { "checkType" : "contains", "matchFor" : "some String" } } ] ...

chechType can be "contains" or "notContains". If it is "contains", it is judged as an error if the response does not contain the string specified as "matchFor". else it is "notContains" it works as expected.