1

Just an outline of what I am trying to do.

I have an existing WebApi service that returns the running windows services on a machine. I have a front end hooked up so that it querys the service using jQuery and Knockout.js

What I am trying to do with SignalR is to use it to poll the WebAPi service to always push the latest changes to the client.

Is SignalR the right framework for this?

Can someone provide me an example of calling a RESTful service with SignalR?

What i would really like to happen is if a service goes down that SignalR would raise that all the way through the WebApi to the Client.

4

1 回答 1

2

SignalR 不是创建或使用 RESTful 服务的正确框架。SignalR 旨在使将数据从服务器推送到客户端变得容易。REST 旨在支持客户端发出请求并接收(接近)即时响应。

您可以从 SignalR 客户端向服务器端Hub方法发出请求,但 Hub 方法不会公开 REST 端点。

于 2013-02-06T18:36:07.630 回答