Hi Team,
I am using the component: signalr_flutter Version 0.2.1,
but i am unable to connect to Server with https protocol, not even getting proper error response. from plugin.
and not able to getting callbacks response in JSON format. In hubCallbacks methods.
I cannot find a way How to fix this. can we customized http client in SignalR plugin. and plugin must support hubCallback with JSON model not only String.
signalR = SignalR(
'https://server-name/', "HUB-NAME",
hubMethods: ["methods1", "Methods2"],
statusChangeCallback: (status) => {
if (status == ConnectionStatus.connected)
{
print("Connected to SignalR Hub"),
signalR.invokeMethod("subscribeForNotifications", arguments: [
arg1
arg2,
]).then((result) {
print("Subscribed for notifications: $result");
}).catchError((err) {
print("Error subscribing for notifications: $err");
})
}
},
hubCallback: (methodName, message) =>. // message only as String other format not supported.
{
print('MethodName = $methodName, Message = $message')
}
);
await signalR.connect();
Please let me know if any issues / clarifications is required on the same.
Thanks and Regards,
Ibrahim Sulaiman
Hi Team,
I am using the component: signalr_flutter Version 0.2.1,
but i am unable to connect to Server with https protocol, not even getting proper error response. from plugin.
and not able to getting callbacks response in JSON format. In hubCallbacks methods.
I cannot find a way How to fix this. can we customized http client in SignalR plugin. and plugin must support hubCallback with JSON model not only String.
signalR = SignalR(
'https://server-name/', "HUB-NAME",
hubMethods: ["methods1", "Methods2"],
statusChangeCallback: (status) => {
if (status == ConnectionStatus.connected)
{
print("Connected to SignalR Hub"),
signalR.invokeMethod("subscribeForNotifications", arguments: [
arg1
arg2,
]).then((result) {
print("Subscribed for notifications: $result");
}).catchError((err) {
print("Error subscribing for notifications: $err");
})
}
},
hubCallback: (methodName, message) =>. // message only as String other format not supported.
{
print('MethodName = $methodName, Message = $message')
}
);
await signalR.connect();
Please let me know if any issues / clarifications is required on the same.
Thanks and Regards,
Ibrahim Sulaiman