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

added standalone client instead of the play 2.8 specific client. #244

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

conorml
Copy link

@conorml conorml commented Feb 7, 2022

Wanted to get your thoughts on this. As of play 2.6 the standalone client is separated from play. So it would be nice to have this mocking library dependent as much as possible on the standalone client.

The one problem is that it does still require a play dependency to make everyting work. Though it's only play-test and it seem like most the things being used from play-test have been pretty stable, but I'm not sure theres a way to remove the play dependency entirely to only have a dependency on standalone play client.

@conorml conorml marked this pull request as ready for review February 23, 2022 21:26
@conorml
Copy link
Author

conorml commented Mar 9, 2022

@avdv thoughts?

@gaeljw
Copy link
Collaborator

gaeljw commented Nov 19, 2023

I haven't looked at this in the details but:

  • Play's WSRequest extends Play Standalone StandaloneWSRequest and enriches it,
  • same for the responses classes
  • Play's WSClient does not extend Play Standalone StandaloneWSClient, it composes it class AhcWSClient(underlyingClient: StandaloneAhcWSClient) extends WSClient

Because of this, people's code depending on Play's WSClient wouldn't work as-is if given a StandaloneWSClient, they'd need to wrap it manually in a AhcWSClient.

That said, we could provide two modules: one for the standalone client, and one for Play's full framework. The latter would depend on the former and do the wrapping so that users don't have to do it themselves.

I will give it more thought.

Would this still be of use for you @conorml ?

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.

2 participants