Skip to content
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

Adding query string parameters on HubConnection produces unexpected querystring format #15

Open
snipsens opened this issue Sep 7, 2017 · 1 comment

Comments

@snipsens
Copy link

snipsens commented Sep 7, 2017

Hi, I'm getting unexpected results when I'm trying to add querystring parameters on initialisation of a HubConnection.

        let aQueryDict: [String:String] = ["parameterA": "valueA", "parameterB": "valueB"]
        hubConnection = HubConnection(withUrl: "https://test.com", queryString: aQueryDict)

Gives me: (Outgoing call intercepted with "Charles")

https://test.com/signalr/negotiate?clientProtocol=1.3&connectionData=%5B%7B%22Name%22%3A%22livetiminghubv1%22%7D%5D&queryString%5BparameterA%5D=valueA&queryString%5BparameterB%5D=valueB

Wich decodes to:
https://test.com/signalr/negotiate?clientProtocol=1.3&connectionData=[{"Name":"livetiminghubv1"}]&queryString[parameterA]=valueA&queryString[parameterB]=valueB

I would expect:
https://test.com/signalr/negotiate?clientProtocol=1.3&connectionData=%5B%7B%22Name%22%3A%22livetiminghubv1%22%7D%5D&parameterA=valueA&parameterB=valueB

Wich decodes to:
https://test.com/signalr/negotiate?clientProtocol=1.3&connectionData=[{"Name":"livetiminghubv1"}]&parameterA=valueA&parameterB=valueB

Thnx! Seb.

@jordancamara
Copy link
Contributor

Hi snipsens,

There's been two releases since then. Could you try in the latest 2.0.0 release?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants