AhcWSClient not found in play.api.libs.ws.ahc


(Nursba) #1

Trying to create WSClient in scala sbt project, directly using code from documentation

import com.typesafe.config.ConfigFactory
import play.api._
import play.api.libs.ws._
import play.api.libs.ws.ahc._

val configuration = Configuration.reference ++ Configuration(ConfigFactory.parseString(
  """
    |ws.followRedirects = true
  """.stripMargin))

// If running in Play, environment should be injected
val environment = Environment(new File("."), this.getClass.getClassLoader, Mode.Prod)
val wsConfig = AhcWSClientConfigFactory.forConfig(configuration.underlying, environment.classLoader)
val wsClient: WSClient = AhcWSClient(wsConfig)

but Intelij doesnt see AhcWSClient class in play.api.libs.ws.ahc package . What may be the reason ?? 
Play version of project is -- "com.typesafe.play"    %% "play-ws"             % "2.6.19"

(Aditya Athalye) #2

Can you check your .ivy2 folder. You should have

play-ahc-ws_<scala_version>/jars/play-ahc-ws_<scala_version>-2.6.19.jar

(Nursba) #3

hello, no there is no such jar file


(Nursba) #4