1

I want to call a SignalR event from Postman, I have gone through this question as well, But it's not helping me.

It's giving the below error, I have mentioned the URL as myUrl due to security reasons in this example.

enter image description here

Below is the C# equivalent code for the same.

private HubConnection hub connection;
private IHubProxy hubProxy;

hubConnection = new HubConnection(myUrl, useDefaultUrl: false);
hubConnection.TransportConnectTimeout = new TimeSpan(10000);
hubConnection.Credentials = CredentialCache.DefaultCredentials;
hubConnection.Closed += _hubConnection_Closed;
hubConnection.Error += _hubConnection_Error;

hubProxy = hubConnection.CreateHubProxy(myHubName);
hubProxy.On<CurrencyPair>("getItems", value =>
{
    DoSomething(value);
}

Postman version 9.31.9

Vivek Nuna
  • 25,472
  • 25
  • 109
  • 197

0 Answers0