javascript - What is meant by webhook? -


i have read http://en.wikipedia.org/wiki/webhook still not clear webhook concept.
have following doubts webhook :
1.can explain use of webhook real world example?
2.why should use webhook in application?

as alluded in wikipedia article, excellent real-world example source code repository github. suppose you're using github manage source, , separate tool (bamboo, jenkins, whatever) perform continuous integration. every time push code github, want trigger build in ci tool. how're going make happen?

given topic, shouldn't surprising answer 'webhooks'.

github offers variety of webhook triggers. see https://developer.github.com/webhooks/ documentation - concrete example may help. in brief, however, each webhook consists of:

  • an event triggers hook (such 'code pushed repository')
  • a url github should send request when event occurs (such incoming trigger-point in ci package)
  • a payload (the request body sent selected url).

the important thing here github doesn't know ci system you're using. doesn't care. knows events occur in domain, , it's outside system register interest , decide notification. creates highly generic , scalable interface, , avoids requiring git make (potentially limiting) assumptions or may want react events.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -