I try to make a WinForm application with a web server.
Did so:
1. I use github.com - "eske / SimpleHttpServer" - link
(https://github.com/jeske/SimpleHttpServer).
2. Created a WinForm project.
3. Added a link to the library project SimpleHttpServer
.. \ SimpleHttpServer \ bin \ Debug \ SimpleHttpServer.dll
4. Added code to Form1. (see below "My Code").
Questions
1. Have I correctly connected the server and WinForm?
2. How to make the data (JSON) that is transmitted in a POST request to my server automatically fall into the variable I need in WinForm?
In other words: as soon as the POST request arrives at the server, the data is automatically placed in the variable.
My goal: to get acquainted with the principles of work Viber Api.
For this, I propose to host the application on the local computer.
WinWorm (user interface), which will interact with the server Viber Api). Everything is placed on one computer and used by one user.
With the help of Ngrok application will be open to the Internet.
The Ngrok service provides links forhttp: // localhost: XXXXX links like https: // 6eb5a091.ngrok.io /
My code.