Add HTTP QUERY method support (RFC 10008)#1366
Open
ewalsh wants to merge 4 commits into
Open
Conversation
QUERY is a safe, idempotent method that carries a request body — semantically like GET but with POST-style body support. - Add query[T: BodyWritable](body: T) to Scala StandaloneWSRequest trait - Add query(BodyWritable body) to Java StandaloneWSRequest interface - Add AHC implementations for both Scala and Java - Add MiMa exclusions for new abstract method - Add unit tests (Scala + Java) and integration test - Add README documentation for both Scala and Java - Housekeeping: add .metals/ and .vscode/ to .gitignore
7 tasks
cchantep
reviewed
Jul 8, 2026
Author
|
Thanks for the review @cchantep! All feedback addressed in the latest push:
Apologies for the force-push — should have been a fixup commit to preserve review context. Happy to squash on merge if that's the preferred workflow here. |
cchantep
reviewed
Jul 11, 2026
cchantep
reviewed
Jul 12, 2026
cchantep
approved these changes
Jul 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Checklist
Purpose
Adds first-class support for the HTTP QUERY method (RFC 10008) to play-ws-standalone.
QUERY is a safe, idempotent method that carries a request body — semantically like GET but with POST-style body support. This is useful for complex search queries that don't fit in a URL query string.
Background Context
The implementation mirrors the existing
post/put/patchpattern exactly:def query[T: BodyWritable](body: T): Future[Response]CompletionStage<? extends StandaloneWSResponse> query(BodyWritable body)withBody(body).execute("QUERY")/setMethod("QUERY").setBody(body).execute()AHC does not strip the body for custom/unknown method strings — verified via unit tests and integration tests against a mock server.
Changes
play-ws-standalone/.../StandaloneWSRequest.scalaqueryto Scala traitplay-ws-standalone/.../StandaloneWSRequest.javaqueryto Java interfaceplay-ahc-ws-standalone/.../StandaloneAhcWSRequest.scalaplay-ahc-ws-standalone/.../StandaloneAhcWSRequest.javabuild.sbtREADME.md.gitignore.metals/and.vscode/Validation
sbt validateCode— ✅ (headerCheckAll, scalafmtSbtCheck, scalafmtCheckAll)sbt mimaReportBinaryIssues— ✅ (with exclusions for the new abstract method)sbt +test— ✅ (153 tests pass on both Scala 2.13.18 and 3.3.8)References