|
1 | | -# SignalR-JS-Client |
2 | | -ASP.Net Core Signal R JavaScript Client |
| 1 | +# SignalR-Web-Client |
| 2 | +ASP.Net Core Signal R JavaScript based Web Client |
3 | 3 |
|
4 | 4 |
|
5 | | -This is a UI based ASP.Net Core Signal R JavaScript Client. It is used to test Signal R Hub. |
6 | | -Using this tool, we can send the data to the SignalR hub. Also, the tool can receive the response emit from the Signal R Hub. |
| 5 | +This is a UI based ASP.Net Core SignalR client. It is used to test SignalR Hub. It is a debugging tool to test ASP.Net Core SignalR hubs. Using this tool, we can send the data to the SignalR hub and receive the response emit from the Signal R Hub. This tool is design for dotnet developer to make their life easier when they work with SignalR. |
| 6 | + |
| 7 | + |
| 8 | +<p align="center"> |
| 9 | + <img src="./src/images/SignalR-Web-Client.jpg" > |
| 10 | + <br> |
| 11 | +</p> |
| 12 | + |
| 13 | + |
| 14 | +#Prerequsit |
| 15 | + |
| 16 | + |
| 17 | +# How it works? |
| 18 | + |
| 19 | +SignalR Web Client have two views: |
| 20 | +1. Basic |
| 21 | +2. Advance |
| 22 | + |
| 23 | +## Baisc |
| 24 | + |
| 25 | +In this basic view, you can contact to hub by providing the hub address. And to can start |
| 26 | + |
| 27 | +1. Pass the valid Hub address in Service Endpoint textbox.(for ex. https://localhost:5001/Test/OneHub). |
| 28 | +<img src="./src/images/1.png" width="600px" height="400px" /> |
| 29 | + |
| 30 | +2. Once click on Connect button, it will make connection with server. Once the connection is established, if any data is broadcast from the Hub(ex. OneHub) to all the client. Then, it will be displayed in Response payload textbox. |
| 31 | + |
| 32 | +3. If we want to test any Hub method. For exmaple |
| 33 | +```csharp |
| 34 | +public class OneHub : Hub |
| 35 | +{ |
| 36 | + public async Task TestCall(string data) |
| 37 | + { |
| 38 | + var connectionId = Context.ConnectionId; |
| 39 | + await Clients.Client(connectionId).SendAsync("ReceiveData", $"Data Received from TestCall method: {data}"); |
| 40 | + } |
| 41 | +} |
| 42 | +``` |
| 43 | +So, in the tool, we have to pass the parameter. |
| 44 | + |
| 45 | +Server Method: TestCall |
| 46 | +Request Payload: It can take multiple parameters. In our example, TestCall method only taking one parameter of type string. |
| 47 | +ex. Arg: abc |
| 48 | + Type: Text |
| 49 | + |
| 50 | +Currently Data Type supports: Text, Number & JSON |
| 51 | + |
| 52 | +<img src="./src/images/5.png" width="300px" height="300px" /> |
| 53 | + |
| 54 | +Then click on send button. It will send all the data to the hub. |
| 55 | + |
| 56 | +<img src="./src/images/3.png" /> |
| 57 | + |
| 58 | +## Advance |
| 59 | + |
| 60 | +### Reporting Issues |
| 61 | + |
| 62 | +Nothing is perfect. Same rule goes to this tool also. |
| 63 | +- Found an issue or problem? |
| 64 | +- Want a new feature? |
| 65 | + |
| 66 | +Then, just open a [new clear and descriptive issue](../../issues/new). |
| 67 | + |
| 68 | + |
| 69 | +## License |
| 70 | + |
| 71 | +[MIT License](https://opensource.org/licenses/MIT) |
0 commit comments