Skip to content
CAI
Software that uses CAICheck a score

playframework/play-ws

54.3

Adequate · 7 November 2026

7.9k

lines of production code

Scala

with Java

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add XML body read and write support for WS requests and responses

Users can now read and write XML bodies in Play WS requests and responses. The new XML utilities parse XML strings and input streams into DOM documents with secure processing features (disabling external entities and DOCTYPE declarations), and convert DOM documents back to byte strings. The XMLBodyReadables interface provides a default xml() method to read response bodies as DOM, while XMLBodyWritables allows writing DOM documents as XML with the application/xml content type.

play-ws-standalone-xml/src/main/java/play/libs/ws · high confidence

Add implicit JSON body readables and writables for Play-WS

This change introduces \JsonBodyReadables\ and \JsonBodyWritables\ traits in the \play-ws-standalone-json\ module, enabling seamless conversion between HTTP response bodies and Play JSON \JsValue\ objects. Users can now directly read JSON responses using \response.body\[JsValue\]\ via the provided implicit \BodyReadable\, and write \JsValue\ payloads to requests using the implicit \BodyWritable\, which efficiently serializes JSON to byte arrays without intermediate string conversions. Additionally, a method is provided to create \BodyWritable\ instances for Jackson \JsonNode\ using a custom \ObjectMapper\.

play-ws-standalone-json/src/main/scala/play/api/libs/ws · high confidence

HTTP response caching support for Play WS

The Play WS standalone client now includes an HTTP cache implementation that stores and serves cached responses according to RFC 7234. This adds a \CachingAsyncHttpClient\ that intercepts requests, checks a cache for stored responses, and serves fresh or stale content without hitting the origin server when appropriate. The cache supports validation (conditional requests), stale-while-revalidate, and stale-if-error behaviors, and includes a configurable heuristics flag to estimate freshness for responses lacking explicit expiry headers.

play-ahc-ws-standalone/src/main/scala/play/api/libs/ws/ahc/cache · high confidence

Introduce standalone Play WS API with Pekko streams and type-safe body handling

The \play-ws-standalone\ module now provides a self-contained HTTP client API built on Apache Pekko Streams, decoupled from the Play Framework's internal actor system. Users can now construct requests and handle responses using a new type-safe body system: \BodyReadable\ and \BodyWritable\ type classes replace previous implicit conversions, allowing explicit control over how request bodies are written (e.g., \File\, \String\, \Map\ for form data) and how response bodies are read (e.g., \String\, \ByteString\, \ByteBuffer\, or streamed \Source\). The API includes \StandaloneWSClient\ and \StandaloneWSRequest\ traits for building requests with standard HTTP methods, headers, query parameters, and authentication, while \StandaloneWSResponse\ exposes status, headers, cookies, and the typed body content. Configuration is handled via \WSClientConfig\ and \WSConfigParser\, supporting timeouts, redirects, proxy settings, and SSL configuration. This change establishes a modern, non-blocking foundation for HTTP interactions in Play applications.

play-ws-standalone/src/main/scala/play/api/libs/ws · high confidence

New configurable AHC standalone client settings

The standalone AHC implementation now exposes a comprehensive set of configuration options via reference.conf, allowing users to tune connection pooling (max connections, idle timeouts, cleaner periods), HTTP/2 behavior (enabling h2 over ALPN, adjusting flow-control windows and concurrent stream limits), security controls (refusing HTTPS-to-HTTP or cross-origin body redirects, disabling URL encoding), and operational settings (cookie store usage, redirect limits, request retries, and shutdown timeouts).

play-ahc-ws-standalone/src/main · high confidence

New typed JSON body handling interfaces for Play WS

The \play-ws-standalone-json\ module now provides \JsonBodyReadables\ and \JsonBodyWritables\ interfaces to handle JSON bodies with greater type safety and efficiency. \JsonBodyReadables\ allows parsing response bodies directly into Jackson \JsonNode\ objects using a configurable \ObjectMapper\, while \JsonBodyWritables\ enables writing \JsonNode\ instances to request bodies as \ByteString\ payloads, bypassing intermediate string serialization for better performance. These interfaces integrate with the default Play JSON object mapper but allow custom mappers to be injected for specific use cases.

play-ws-standalone-json/src/main/java/play/libs/ws · high confidence

Play WS standalone Java API implementation

The Play WS standalone module now provides a complete Java API implementation for HTTP client operations. This includes the \StandaloneAhcWSRequest\ for building requests with support for cookies, authentication, and query parameters, and response classes (\StandaloneAhcWSResponse\, \StreamedResponse\) that expose headers, cookies, and body content (including streaming support via Akka Streams). Configuration is handled by \AhcWSClientConfigFactory\, and cookie parsing utilizes the shaded Netty decoder.

play-ahc-ws-standalone/src/main/java/play/libs/ws · high confidence

Removals

Removal of Play WS implementation classes

The Play WS implementation classes located in play-ahc-ws/src/main/java/play/libs/ws have been removed. This includes the AsyncHttpClient-based client (AhcWSClient), the deprecated NingWSClient, the request builder (AhcWSRequest), cookie handling (AhcWSCookie), and the associated API and module classes (AhcWSAPI, AhcWSModule). Users relying on these specific implementation classes for direct instantiation or dependency injection will need to adjust their code, as these components are no longer available in this module.

play-ahc-ws/src/main/java/play/libs/ws · high confidence

Removal of Play WS standalone implementation

The standalone Play WS implementation (including the \play-ahc-ws\ module and its \play.api.libs.ws.ahc\ and \play.api.libs.ws.ning\ packages) has been removed. This deletes the core HTTP client classes (\AhcWSClient\, \NingWSClient\), their configuration parsers (\AhcConfig\, \NingConfig\), streaming utilities, and the legacy \WS\ companion object, effectively eliminating the ability to use Play's built-in standalone WebSocket client implementation.

(repo-wide) · high confidence

Removal of WSTestClient test utility

The \WSTestClient\ trait, previously located in \play-ahc-ws/src/main/scala/play/api/test/\, has been removed. This file provided helper methods for constructing WS requests and managing test clients within Play application tests. Its deletion indicates that this specific test utility is no longer part of the library's public API or test infrastructure.

play-ahc-ws · high confidence

Removal of legacy Play WS Java API classes

The \play.libs.ws\ package has removed several legacy classes, including \WS\, \WSAPI\, \StreamedResponse\, \WSCookie\, \WSRequestExecutor\, \WSRequestFilter\, \WSResponse\, and \WSResponseHeaders\. This change eliminates the static entry points and older response abstractions that were previously part of the Play WS library, requiring users to rely on the standalone implementation or dependency-injected \WSClient\ instances instead.

play-ws/src/main/java/play/libs/ws · high confidence

Behavioural changes

Introduction of DefaultObjectMapper for Jackson integration

A new DefaultObjectMapper object has been added to the play.libs.ws package, providing a centralized way to access the Jackson ObjectMapper instance used by the Play JSON library. This change enables users in the Java/Scala WS standalone JSON module to easily retrieve the underlying Jackson mapper for custom serialization or deserialization needs, leveraging the private\[play\] methods now accessible via the Scala object structure.

play-ws-standalone-json/src/main/scala/play/libs/ws · high confidence

OAuth library implementation switched to shaded dependencies

The OAuth module in the standalone Play WS implementation now uses internally shaded versions of the OAuth Signpost and AsyncHttpClient libraries instead of external dependencies. This change removes the need for users to manually provide these libraries, as the required classes are now bundled within the Play WS standalone artifact, simplifying dependency management for applications using OAuth authentication.

play-ahc-ws-standalone/src/main/java/play/libs/oauth · high confidence

OAuth library migrated to standalone implementation with shaded dependencies

The OAuth implementation has been moved from the \play-ahc-ws\ module to the new \play-ahc-ws-standalone\ module. To support this standalone usage, external dependencies for AsyncHttpClient and Signpost are now shaded (prefixed with \play.shaded\) to prevent version conflicts with user applications. Consequently, the code now uses \DefaultOAuthProvider\ instead of \CommonsHttpOAuthProvider\, and the example usage demonstrates integration with \StandaloneAhcWSClient\ rather than the previous client type.

play-ahc-ws-standalone/src/main/scala/play/api/libs/oauth · high confidence

Play WS Java API refactored with typed body handling and Pekko streams

The Java WS client API in play.libs.ws has been restructured to use a standalone interface model (StandaloneWSClient, StandaloneWSRequest, StandaloneWSResponse) and now relies on a typed body system using BodyReadable and BodyWritable interfaces. This replaces the previous method overloads that accepted raw types (String, JsonNode, File, InputStream) with a unified BodyWritable contract for requests, allowing for more consistent and type-safe body handling. Response bodies are now accessed via BodyReadable transformations, and the underlying streaming infrastructure has been migrated from Akka to Apache Pekko, as evidenced by the imports of org.apache.pekko.stream.javadsl.Source and org.apache.pekko.util.ByteString.

play-ws-standalone/src/main/java/play/libs/ws · high confidence

Play WS Standalone rebrands and updates documentation

The project has officially rebranded from 'Play WS' to 'Play WS Standalone', shifting the Maven groupId from \com.typesafe.play\ to \org.playframework\ and updating the README to reflect the new standalone nature of the library (no Play dependencies). The documentation now highlights support for typed request/response bodies, the QUERY HTTP method (RFC 10008), and streaming responses using Pekko Streams (referencing \org.apache.pekko\). Additionally, the repository now uses Scalafmt 3.11.5 for code formatting and updates the LICENSE file to the standard Apache 2.0 text.

(repo-wide) · high confidence

Play WS standalone configuration simplified and TLS defaults updated

The Play WS standalone module's reference configuration has been streamlined by removing obsolete SSL settings (such as disabled signature/key algorithms, debug flags, and weak protocol/cipher allowances) and AHC-specific connection pool settings that are no longer managed here. Additionally, the default SSL protocol has been upgraded from TLSv1.2 to TLSv1.3, with TLSv1.2 explicitly enabled alongside it, and comments added recommending environment variables for keystore/truststore passwords.

play-ws-standalone · high confidence

Play WS standalone implementation migrated to Apache Pekko and Jakarta EE

The Play WS standalone client has been refactored to replace the Akka dependency with Apache Pekko (e.g., \org.apache.pekko.stream.Materializer\) and migrate injection annotations from \javax.inject\ to \jakarta.inject\. The implementation now uses shaded AsyncHttpClient classes (prefixed with \play.shaded.ahc\) to isolate dependencies, and introduces new configuration options such as \connectionPoolCleanerPeriod\ and \useCookieStore\ in \AhcWSClientConfig\. Additionally, the \StandaloneAhcWSRequest\ now supports the HTTP QUERY method and allows enabling/disabling the cookie store, while the \AhcCurlRequestLogger\ has been updated to correctly handle Basic authentication headers and various body types.

play-ahc-ws-standalone/src/main/scala/play/api/libs/ws/ahc · high confidence

Play WS standalone library migrates to Apache Pekko and adds request filters

The Play WS standalone library has been refactored to run on Apache Pekko instead of Akka, updating internal imports and materializer usage. This change introduces a new request filter mechanism (WSRequestFilter) that allows users to intercept and modify outgoing HTTP requests, demonstrated by new logging and header-appending filter implementations. Additionally, the library now supports streaming request bodies via SourceBodyWritable and provides a new AhcCurlRequestLogger for debugging requests in curl format.

repository · high confidence

Preserve Scala 2 and Scala 3 extractor compatibility for WS client configuration

The Play WS standalone module now maintains distinct extractor implementations for Scala 2 and Scala 3 to prevent breaking existing pattern matches. In Scala 2, the \AhcWSClientConfigExtractor\ returns an \Option\ containing a 12-tuple of configuration fields, while Scala 3 uses a name-based extractor that returns the config object itself. This change ensures that code relying on the specific extraction syntax of each platform continues to compile and function correctly without requiring updates to user code.

play-ahc-ws-standalone/src/main/scala-2/play/api/libs/ws, play-ahc-ws-standalone/src/main/scala-3/play/api/libs/ws · high confidence

Prevent replay of streamed request bodies

The Play WS standalone module now rejects attempts to replay or reuse a streamed request body. If a request body generator is invoked more than once, it throws an IllegalStateException with the message "A streamed request body cannot be replayed". This change ensures that reactive streams-based request bodies are consumed exactly once, preventing potential data corruption or undefined behavior from duplicate consumption.

play-ahc-ws-standalone/src/main/java/play/api/libs/ws · high confidence

Secure XML parsing and body handling in Play WS

The Play WS standalone XML module now provides secure, configurable XML parsing and body read/write capabilities. A new XML object configures the SAX parser to prevent XXE (XML External Entity) injection by disabling external general and parameter entities, disallowing DOCTYPE declarations, and enabling secure processing features. This secure parser is used by XMLBodyReadables to safely convert response bodies into Scala XML elements, and by XMLBodyWritables to serialize XML nodes and DOM documents into request bodies with the 'text/xml' content type.

play-ws-standalone-xml/src/main/scala/play/api/libs/ws · high confidence

Fixes

Fixes OAuth 1 signature generation for requests with duplicate parameters

The OAuth 1 signing logic in Play WS has been corrected to properly handle requests containing duplicate parameter names in both the query string and the form body. Previously, the underlying Signpost library would overwrite earlier values with later ones, violating OAuth 1 specifications which require all parameters to be included in the signature base string. This change introduces a custom consumer that merges query and body parameters correctly, ensuring that signatures are generated accurately for complex requests.

play-ahc-ws-standalone/src/main/java/play/api/libs/oauth · high confidence

Test coverage

Added JMH benchmarks for StandaloneAhcWSRequest map operations; Added integration test for HTTP response caching; Added integration test infrastructure for Play WS HTTP/2, ALPN, and backpressure scenarios; Added integration tests for Play WS AHC client; Added integration tests for Play WS Ahc client; Added integration tests for Play WS client and request filters; Added test coverage for AHC WS client configuration and request handling; Added test coverage for AhcWSRequest and AhcWSResponse; Added test for OAuth signpost availability; Added test suite for HTTP caching components; Added tests for JSON body decoding with various character encodings; Removal of Play WS and OpenID test suite; Removed OAuth test suite and verification utilities; Updated WSConfigParserSpec test suite; Updated test logging configuration and added test data.

Dependencies

Build system upgraded to sbt 2.1.0-M3 with new plugin configuration

The project's build infrastructure has been upgraded from sbt 0.13.13 to sbt 2.1.0-M3. This change replaces the previous Interplay and Sonatype plugins with a new set of sbt plugins including sbt-assembly (2.5.0), sbt-scalafmt (2.6.2), sbt-mima-plugin (1.2.1), sbt-header (5.11.0), sbt-jmh (0.4.8), and sbt-ci-release (1.12.1). Additionally, new build helper files were added: AutomaticModuleName.scala for setting JPMS module names, CleanShadedPlugin.scala for managing Ivy cache cleanup, and a centralized Dependencies.scala file that defines current library versions for Pekko, Netty, and other dependencies.

project · high confidence

Major build system overhaul and dependency updates

The build configuration has been significantly refactored, upgrading the target Java version to 17 and supporting Scala 3 alongside Scala 2.13. Key dependency updates include switching to the \org.playframework\ organization, adopting Pekko, and integrating sbt-assembly for shading AsyncHttpClient and OAuth libraries. The build also introduces MiMa for binary compatibility checking against version 3.0.0 and updates various internal libraries such as ssl-config and scala-xml.

(dependencies) · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 58 → 54 (-3.6)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 53 → 53 (+0.0)
  • Architecture 76 → 75 (-0.9)
  • Maturity 51 → 48 (-3.1)
  • Readiness 71 → 69 (-1.6)
  • Security 74 → 57 (-17.3)
  • Performance 80 → 89 (+8.5)

Resolved (3)

  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • Off-boarding risk: anonymized user #1

New (3)

  • Dependency hygiene PARTLY measured — sbt declarations read, dependency currency not (Maven Central unreachable)
  • Off-boarding risk: anonymized user #1
  • Orphaned file (play-ahc-ws-standalone/src/main/scala/play/api/libs/oauth/OAuth.scala)

Changes since last survey

  • 12 commits — 12 feature/other, 0 fixes

By area

  • (repo) — 6 commits
  • project/Dependencies.scala — 4 commits
  • project/build.properties — 2 commits

Notable commits

  • change: Merge pull request #1490 from scala-steward/update/patches
  • change: Merge pull request #1491 from scala-steward/update/sbt-2.1.0-RC2
  • change: Merge pull request #1494 from scala-steward/update/patches
  • change: Merge pull request #1495 from scala-steward/update/netty-buffer-4.2.20.Final
  • change: Merge pull request #1498 from scala-steward/update/pekko-actor-typed-2.0.0
  • change: Merge pull request #1499 from scala-steward/update/sbt-2.1.0-RC3
  • change: logback-core 1.6.6 (was 1.6.5)
  • change: netty-buffer, netty-codec-base, ... 4.2.20.Final (was 4.2.19.Final)
  • change: pekko-actor-typed, ... 2.0.0 (was 2.0.0-M4)
  • change: sbt 2.1.0-RC2 (was 2.1.0-RC1)
  • change: sbt 2.1.0-RC3 (was 2.1.0-RC2)
  • change: scala3-library 3.3.9 (was 3.3.8)

Architecture

  • Unchanged — 0 containers · 1 contexts · 0 edges

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

playframework/play-ws was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 7 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 612e2ea9d6d76cb37df7b5c3c9c6ca5b896d637c — the exact code this score is about.
  • Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.3+preprod-5f8314471808.