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();
- }
- }
- }

Chittaranjan SwainPosted Jul 26, 2019, 6:50 AM
Amit MohantyPosted Jul 4, 2019, 11:39 PM
Ivan ClimovPosted Jul 4, 2019, 8:22 AM
Ivan ClimovPosted Jul 4, 2019, 8:22 AM
Guest UserPosted Jul 4, 2019, 7:57 AM
Amit MohantyPosted Jul 4, 2019, 2:42 AM
Rajanikant HawaldarPosted Jul 4, 2019, 1:53 AM
Ivan ClimovPosted Jul 4, 2019, 1:49 AM
Ivan ClimovPosted Jul 4, 2019, 12:53 AM
@pritaeas
Amit MohantyPosted Jul 4, 2019, 12:00 AM
Ivan ClimovPosted Jul 3, 2019, 9:46 AM
Guest UserPosted Jul 3, 2019, 6:42 AM