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

iterate params if params value is a list #74

Closed
wants to merge 5 commits into from

Conversation

yizshi
Copy link
Contributor

@yizshi yizshi commented Aug 8, 2023

Description

Fix #68,
Iterate params all value when the params is a list.

Motivation and Context

There are api endpoints that accept a list. When the request is GET request, we don't have json request body. So we have to make sure the request url has all the value present.

How Has This Been Tested?

Tested with example code as well as add unittest

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Comment on lines 357 to 358
if (params.get(key) instanceof List) {
List<String> value_list = (List<String>) params.get(key);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if this is the javaic way (or even if that's the right word) to do this.

Copy link
Contributor

@ben-duo ben-duo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pending discussion of how the server-side should behave.

@yizshi yizshi closed this Aug 10, 2023
@yizshi
Copy link
Contributor Author

yizshi commented Aug 10, 2023

Close this PR to wait Duo api server side change.

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

Successfully merging this pull request may close these issues.

Allow duplicate params when crafting the request
2 participants