I need a WinForm application that will be a client for Viber.
I created a WebHook that accepts POST requests from a Viber server.
POST request contains JSON.
WebHook created from ASP.NET Framework template "Empty" + "MVC".
Question.
1. How to make, that if WebHook receives POST request, then received JSON went to "WinForm"?
2. If this solution is not acceptable, then how to organize the transfer of data from WebHook to WinForm in the framework of another solution?
Code HookController.cs
- namespace WebAppl.Controllers
- {
- public class HookController : Controller
- {
- // *** Original code ***
- // GET: Hook
- //public ActionResult Index()
- //{
- // return View();
- //}
- [HttpPost]
- public string Index()
- {
- using (var reader = new StreamReader(Request.InputStream))
- return reader.ReadToEnd();
- }
- }
- }


Guest UserRank #816 · 2.8K reputationPosted Jul 3, 2019, 2:42 AM EDT
Amit MohantyRank #112 · 20K reputationPosted Jul 3, 2019, 8:00 PM EDT
Rajanikant HawaldarRank #110 · 20.2K reputationPosted Jul 3, 2019, 9:53 PM EDT
Amit MohantyRank #112 · 20K reputationPosted Jul 3, 2019, 10:42 PM EDT
Guest UserRank #816 · 2.8K reputationPosted Jul 4, 2019, 3:57 AM EDT
Amit MohantyRank #112 · 20K reputationPosted Jul 4, 2019, 7:39 PM EDT
Chittaranjan SwainRank #216 · 11.3K reputationPosted Jul 26, 2019, 2:50 AM EDT
Ivan ClimovRank #2,765 · 508 reputationPosted Jul 3, 2019, 5:46 AM EDT
Ivan ClimovRank #2,765 · 508 reputationPosted Jul 3, 2019, 8:53 PM EDT
@pritaeas
Ivan ClimovRank #2,765 · 508 reputationPosted Jul 3, 2019, 9:49 PM EDT
Ivan ClimovRank #2,765 · 508 reputationPosted Jul 4, 2019, 4:22 AM EDT
Ivan ClimovRank #2,765 · 508 reputationPosted Jul 4, 2019, 4:22 AM EDT