Home United States USA — software Webhooks in Mule

Webhooks in Mule

69
0
SHARE

What are webhooks? This article outlines the concept, as well as how to make a callback and implement them in Mule.
Join the DZone community and get the full member experience.
A webhook is a lightweight API that powers one-way data sharing triggered by events. In other words, webhooks are automated messages or triggers that an application sends whenever a desired event occurs.
For example, say there’s a movie information application. We need to know whether any new movie has been released recently. In case of API implementation/polling, we need to keep making requests to the movie application to know the details at any point of time. Even if there are no new movie releases, we need to be sending requests to the application again and again to keep checking for new releases which is redundant.
This is where the webhook comes into picture. With webhook implementation, the movie application will make a call to the webhook in the application it is hooked to with required information whenever there’s an update. It means that the movie application will send a notification to the user whenever there’s a new movie release, making the process simple.
Technically, webhooks are “user-defined callbacks made with HTTP,” according to Jeff Lindsay. The webhook URL is generally a HTTP POST implementation. Whenever a desired event occurs at a hooked application, a HTTP POST request will be made to the webhook URL and the application that has hosted the webhook will take necessary actions. The application hosting the webhook may have facilities to subscribe to and unsubscribe from the webhook to accommodate multiple applications as well.

Continue reading...