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

Make cask.QueryParams work for JSON endpoints, and form endpoints, replace subpath = true with cask.RemainingPathSegments #109

Merged
merged 1 commit into from
Jan 4, 2024

Conversation

lihaoyi
Copy link
Member

@lihaoyi lihaoyi commented Jan 4, 2024

subpath = true as a named argument passed to the annotation runs into issues if multiple named arguments are present (see https://stackoverflow.com/questions/55032173/how-to-use-named-arguments-in-scala-user-defined-annotations), which prevents us from using named arguments to the annotation more broadly as a user-facing API.

Using typed parameters to the method def sidesteps this issue, and neatly allows us to provide the captured value to the user. This is also more in line with how we handle inputs in general: cookies, known/typed query params, unknown query params, json input, form fields, etc.

@lihaoyi lihaoyi merged commit addb2d3 into master Jan 4, 2024
4 checks passed
@lolgab lolgab deleted the remaining0path-segments branch January 14, 2024 11:19
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.

1 participant