Skip to content

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

Merged
lihaoyi merged 1 commit intomasterfrom
remaining0path-segments
Jan 4, 2024
Merged

Make cask.QueryParams work for JSON endpoints, and form endpoints, replace subpath = true with cask.RemainingPathSegments#109
lihaoyi merged 1 commit intomasterfrom
remaining0path-segments

Conversation

@lihaoyi
Copy link
Copy Markdown
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
@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