April 2018
Intermediate to advanced
432 pages
10h 38m
English
A monitor endpoint can be invoked by a WebHook configured on a Git repository provider such as GitHub, Bitbucket, or GitLab. Testing such a feature with the application running on localhost is troublesome. It turns out that we may easily simulate such a WebHook activation by calling POST /monitor manually. For example, the Github command should have the header X-Github-Event included in the request. The JSON body with changes in the property files should look as shown in this cURL request:
$ curl -H "X-Github-Event: push" -H "Content-Type: application/json" -X POST -d '{"commits": [{"modified": ["client-service-zone1.yml"]}]}' http://localhost:8889/monitor
Now, let's change and commit a value of one property ...