O'Reilly logo

RESTful Java Patterns and Best Practices by Bhakti Mehta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

WebHooks

WebHooks are a form of user-defined custom HTTP callbacks. With the WebHook model, a client provides the event producer with an endpoint to which the event producer can post the events. When an event is posted to the endpoint, the client application that is interested in such events can take appropriate actions. An example of WebHooks is triggering an event such as a Hudson job using a GIT post-receive hook.

To acknowledge that the subscriber received the WebHook without any problem, the subscriber's endpoint should return a 200 OK HTTP status code. The event producer will ignore the request body and any other request header, other than the status. Any response code outside the 200 ranges, including 3xx codes, will indicate that they ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required