-
Notifications
You must be signed in to change notification settings - Fork 313
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
Parameters not converted properly when using arrays #293
Comments
@daltoniam, any chance for you to review this? |
LinusGeffarth
added a commit
to LinusGeffarth/SwiftHTTP
that referenced
this issue
Jun 25, 2018
Arrays now properly converted to string such as "['1', '2']" and passed to request as parameter. Fixes daltoniam#293.
So, my pull requested (now reverted) actually worked in that particular case, but seemed to make trouble with others.
Then you could do something like:
This works fine. Note: this only works for GET requests. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
First off, thanks for this awesome library!
I want to pass the following dictionary as get parameter:
When passing only non-array values, such as
["param1": 1]
, it works just fine. But when I pass an array of strings, the parameters are converted to a url as follows:...manually making this more legible:
...whereas it obviously should be:
(note the brackets after
param2
).A similar thing happens when trying to code the string array myself by escaping quote chars and then manually adding the parameters in the URL directly:
The response will actually not have any data at all: the URL is nil, the text & data is empty...
Any idea why this is not working properly? Do I need to do anything differently?
The text was updated successfully, but these errors were encountered: