You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何通过Postman调用SignalR事件?尝试现有方案后仍报错

使用Postman调用SignalR事件报错问题

尝试通过Postman调用SignalR事件,已查阅Stack Overflow相关问题但未解决,调用时出现如下错误(示例URL已替换为myUrl):

SignalR调用错误截图

对应的C#实现代码如下:

private HubConnection hubConnection;
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版本:9.31.9

内容的提问来源于stack exchange,提问作者Vivek Nuna

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.19 02:35:15