-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Passing data on connection #13
Comments
I believe what you would want to use is the Example final connection = HubConnectionBuilder()
.withUrl('http://example.com',
HttpConnectionOptions(accessTokenFactory: () => 'MyAccessToken'))
.build(); |
No, I would like to send the metadata in the URL to the hub for example userId. The article what I mean: https://buildingsteps.wordpress.com/2018/10/14/signalr-metadata-for-asp-net-core-2-1/ I think you have a solution but you have it commented in function _createConnectUrl. |
Hi, you have TODO in code:
static String _createConnectUrl(String url, String connectionToken) { if (connectionToken == null) { return url; } // TODO: Look at this... return url + '?' + 'id=$connectionToken'; //return url + (url.contains('?') ? '?' : '&') + 'id=$connectionToken'; }
And my question is do you plan change this TODO? because in this case is difficult pass data.
When i set in url for example "https://test.com/Hub?userId=24" i get in server this one "https://test.com/Hub?userId=24?id=connectionToken"
The text was updated successfully, but these errors were encountered: