Skip to content

Tried to address awkward API issue when append query parameters. #82

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

Merged
merged 4 commits into from
May 16, 2016

Conversation

glynos
Copy link
Member

@glynos glynos commented May 11, 2016

Breaking changes in the uri_builder interface.

The report in #61 is correct in that the interface is awkward and confusing. It was also buggy (encoding didn't happen correctly).

I fixed the encoding issue, and explicitly renamed the functions to:

append_query
append_query_key_value_pair

Although this is a bit more verbose, it removes the element of inconsistency. I would be open to renaming these functions, if there are better names.

Finally, to address the commentary in #61:

"I struggle to think of a use case where, when using uri_builder, I would want to undo a previous call to query by replacing its result with a subsequent call to query"

I agree, but in the very unlikely event that someone needs this, they can simply call "clear_query" before starting again.

@deanberris
Copy link
Member

Oops, conflicts with other changes -- do you mind updating the branch with either a merge or a rebase?

@glynos
Copy link
Member Author

glynos commented May 14, 2016

Fixed the conflicts. Are you OK with the changes?

@deanberris
Copy link
Member

LGTM

Yes, this is fine -- thanks @glynos.

@deanberris deanberris merged commit a04da7c into cpp-netlib:master May 16, 2016
@glynos glynos deleted the uri_build_with_query branch May 17, 2016 12:32
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.

None yet

2 participants