TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ivan Climov
1.1k
692
22.4k
How to send data from WebHook to WinForm?
Jul 3 2019 5:55 AM
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();
}
}
}
Reply
Answers (
12
)
how to ger ckeditor value in controller in mvc
How to use authentication and authorization in Asp.Net core