Hi @Boruch Tkatch ,
1) Do i need to install IIS, or will the visual studio solution itself listen?
2) Must it be an AspNet project, or can i do this as a normal VB.Net project?
As far as I think,they are accroding to your requirment. If you use webhook only for yourself,you could create a normal project and the visual studio listen. And if you use it for Internet, I suggest you could create a mvc or webapi project and you need to install IIS.
3) Is there a barebones example of a webhook listener? That is, what are the basics of listening in code?
There is a example of a webhook listener using web service:
[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public void WebHookDataRecieve() //This method is called from Amazon Simple Notification Service when we receive a bounce.
{
string notification = "";
using (var stream = new MemoryStream())
{
var request = HttpContext.Current.Request;
request.InputStream.Seek(0, SeekOrigin.Begin);
request.InputStream.CopyTo(stream);
notification = Encoding.UTF8.GetString(stream.ToArray());//All of your data will be here in JSON format.
//Simply parse it and access the data.
}
}
The basics are connecting with port and the data coming in JSON format from server.
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best regards,
Yijing Sun