For further actions, you may consider blocking this person and/or reporting abuse
Read next
![aaravjoshi profile image](https://media2.dev.to/dynamic/image/width=100,height=100,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2438298%2F1ebf28a1-b750-44d1-8802-ce7efd90c8ba.jpg)
Building Production-Ready Rate Limiters in Go: A Complete Implementation Guide
Aarav Joshi -
![jfhbrook profile image](https://media2.dev.to/dynamic/image/width=100,height=100,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F130847%2F2fc5345a-75d2-450b-8e77-710509dcac62.jpg)
Matanuska ADR 017 - Vitest, Vite, Grabthar, Oh My!
Josh Holbrook -
![gilles_hamelink_ea9ff7d93 profile image](https://media2.dev.to/dynamic/image/width=100,height=100,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2634312%2F1b62fe74-9c96-4e23-bf75-b9085f792df8.png)
"Revolutionizing Systems Engineering: The Role of AI and Gaussian Processes"
Gilles Hamelink -
![gilles_hamelink_ea9ff7d93 profile image](https://media2.dev.to/dynamic/image/width=100,height=100,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2634312%2F1b62fe74-9c96-4e23-bf75-b9085f792df8.png)
"Revolutionizing Engineering: AI's Role in Requirements Analysis and Security"
Gilles Hamelink -
Top comments (4)
When your dad's car breaks down for whatever reason, he takes it to the repair shop. It'll take a while before the people there can start on your dad's car, because they're working on other cars as well, and the repair itself will take a while. Your father is a busy man, so he won't wait at the shop until his car is done.
He could go home, and call the repair shop every hour to see whether he can come pick up his car, but that's annoying, both for your dad and for the repair shop. So rather than doing that, your dad leaves his phone number at the repair shop, and they call him when the car is done.
Translating this for grownup web developers, you have a web application where something might happen that you're interested in. This could be a post/tweet/video being published, or a previously started transaction being completed, or something completely different. This site could expose an API endpoint that you could use to check for this, but you'd have to call the API endpoint periodically (referred to as polling), in order to get the data. This has some issues:
So rather than constantly checking whether the event you're waiting for has occurred, you give an API endpoint to the site you're watching, and they'll send you a request when something interesting happens, containing the information you're interested in.
Awesome explanation. I think webhooks have a scary vibe at first, but it's really just an arrangement with some application to send a
POST
request to some URL. Maybe that's your app, or maybe it's a URL that Slack, for example, gives you so it can post a message in your channel.It's really not a lot different from any similar transaction within your own app. On dev.to, we have it arranged that any time someone creates a comment, they hit the
/comments
endpoint with aPOST
request. If a second app wanted to do something with the comment creation process as well, they'd tell us to also send a request their way when we're done.Great ELI5 answer!!
Thanks for this!