How do i broadcast a message to all clients via Web API
How do i broadcast a message to all clients via Web API
I have two Projects, an Asp.net WebAPI & a separate Single Page Web Application. My requirement is that when a form is submitted via the web application it is processed at the Web API. Once the Request has been handled successfully i want to broadcast a message to all the clients notifying them that a new request had been submitted.
How can I do it? Any help would be appreciated.
I looked into SignalR, but couldn't find an implementation for this requirement.
"SignalR" will be the best choice for you
– Shubham
Aug 23 at 7:24
I have done similar using "SignalR" you need to look more into it ...Already cooked food is prohibited here :) you need to atleast try and then ask question regarding issue you face but you have to start something....
– confusedMind
Aug 23 at 8:16
@confusedMind True, sorry about that, was kind of lost with this for a while. Simply took a step back and did some research. Signal R did work. I will post the answer, thanks for all the support. :)
– nadz
Aug 24 at 8:14
4 Answers
4
Pusher's got libraries you can use to handle anything notifications https://pusher.com/docs/libraries
I suggest you use signalR to cater your requirement. You can go thru this link https://docs.microsoft.com/en-us/aspnet/signalr/overview/getting-started/ for more details.
If your project is small use pusher "https://pusher.com/"
when you use that well It may be cheaper than you make And less resources.
this is not good advice. You don't need this.
– Keith Nicholas
Aug 23 at 4:28
Use Firebase Cloud messaging
It is much better and easier to implement.
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
not sure what you mean by "looked into SignalR" but so many examples / tutorials of signalr are chat programs that do exactly that.
– Keith Nicholas
Aug 23 at 4:26