Skip to content

signalr error with negotiation request with https protocol and not accepting json response callbacks - signalr_flutter #69

Description

@IbrahimSulai

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions