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

[Bug]: Query array parameters with brackets doesn't work #88

Open
KerezovTobokel opened this issue Jan 10, 2024 · 0 comments · May be fixed by #89
Open

[Bug]: Query array parameters with brackets doesn't work #88

KerezovTobokel opened this issue Jan 10, 2024 · 0 comments · May be fixed by #89
Labels
bug Something isn't working

Comments

@KerezovTobokel
Copy link

KerezovTobokel commented Jan 10, 2024

Platform Version

17.0

SDK Version

1.0.0

Xcode Version

15.0.1

Steps To Reproduce

var type: [Int] = [4, 2]
$0.add(parameters: ["type": type ], arrayEncoding: .noBrackets)

it doesn't work

but when I wrote like this
$0.add(queryItems: type.map({ URLQueryItem(name: "type", value: "($0)")}))
it worked

Expected Behavior

$0.add(parameters: ["type": type ], arrayEncoding: .noBrackets)
with this following parameters I expect following request
.../api/app/v1/shop/list?type=2?type=4
this code should work as you said on documentations

Actual Incorrect Behavior

$0.add(parameters: ["type": type ], arrayEncoding: .noBrackets) this doesn't work
with this following parameters I got
.../api/app/v1/shop/list?type=2

it doesn't append second type of query parameter

@KerezovTobokel KerezovTobokel added the bug Something isn't working label Jan 10, 2024
NicFontana added a commit to NicFontana/RealHTTP that referenced this issue Jan 19, 2024
@NicFontana NicFontana linked a pull request Jan 19, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant