Is it possible to create custom webhooks in asp.net core 2.1 as a sender? I have seen there is som implemented libraries for receiving webhooks. But I can't find anything for when you want to be the sender.
I only have some basic knowledge about webhooks, maybe I am looking at this wrong? Because I have some trouble finding information when I want to be the sender and not the receiver? Does it have another name than "sender"?.
Thanks.
A webhook is a way for a application to provide callbacks for 3-part applications. When an event occurs, the source application typically triggers an http POST call to a pre-configured external URL and wraps the data from the triggered event in the request's payload.
To set up a webhook, go to the settings page of your repository or organization. From there, click Webhooks, then Add webhook. Alternatively, you can choose to build and manage a webhook through the Webhooks API. Webhooks require a few configuration options before you can make use of them.
Some real-world examples of webhooks include: Automatically receive an email every morning about your first meeting in case you forget to check your calendar. Have Instagram photos upload automatically to Twitter accounts. Configure the doorbell to flash the lights when it rings.
There's nothing magical about a "webhook". It's just a term for a server calling back to the client (it typically works the other way around, obviously). In short, a webhook is merely some endpoint set up on the "client", which in this case is actually a web server. In ASP.NET Core, that would be just an action on a controller, tied to a particular route, for instance. The "server", the one that's going to be hitting the webhook, is just making an HTTP request to that endpoint.
In short, there's no framework or library for this, because there's nothing to it. If you're the one that needs to hit a webhook, then you'll just make a request via HttpClient
to that endpoint. Simple as that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With