What is the difference between the following libraries:
libraryDependencies += "com.typesafe.play" %% "play-ahc-ws-standalone" % "LATEST_VERSION"
and
libraryDependencies += "com.typesafe.play" %% "play-ahc-ws" % "LATEST_VERSION"
I am just trying to figure which is the correct one to use. What I did was to create a Play module in a separate library and I want to inject that into a Play application. But when I used the first library listed above, it only offers a StandaloneWSClient. When I injected that into a Play application it couldn't bind an implementation to it. But when I switched the second library, it offers a WSClient which the Play application could find an implementation to bind to as it already has one which you can specify in the build.sbt definition ie ws.
Within Play project you should use
play-ahc-wswhich is usually added like soThe
wsvalue comes from Play's sbt pluginOn the other hand,
play-ahc-ws-standaloneis a HTTP client in its own right which can be used outside Play projects, just how one could use, for example,scalaj-httporrequests-scalaHTTP clients which are in no way aware of Play.The difference is documented by Play 2.6 Migration Guide.