The answer in my case is to use HttpListener. Add a prefix for https://server:port/, verify the source, and read HttpListenerContext.Request.InputStream.
Log Webhook requests
Remote server periodically sends webhook notifications to us. I want to record the request and send back a 200. The request is a POST to /, so only the headers and payload matter, the headers for authentication, and the payload for the data. The data would be written to a file or database after which some other program would process it.
We have an SSL certificate and i setup my local IIS to host the website. I verified the payload is received via Failed Request Tracing.
I have been trying to write ASP.NET projects but cannot seem to figure out how to get the request into the program itself. There are a lot of examples of webhooks out there, but that seems like overkill for a project that uses no path and only receives a small payload. I am trying to figure out what is the simplest way to do this. Use IIS? ASP? It makes not difference whether the program is .net core or standard, or the language.
What is the simplest way to record an https post request with the payload and send back a 200?