I have this code, where I am making an ask request in Scala:
implicit val result =system.actorOf(Props(new TestActor("TestingName")),name = "Scala")
val future3:Future[String]= ask(result ,Message).mapTo[String]
val results = Await.result(future3, 5 second)
here my import statements
import scala.concurrent.{Await, Future}
import akka.http.scaladsl.server.Directives._
import akka.stream.ActorMaterializer
import akka.util.Timeout
import akka.pattern.ask
import scala.concurrent.Await
import scala.concurrent.duration._
and I get the error messages like
Error:(42, 35) could not find implicit value for parameter timeout: akka.util.Timeout val future3:Future[String]= ask(result ,Message).mapTo[String]
Error:(42, 35) not enough arguments for method ask: (implicit timeout: akka.util.Timeout)scala.concurrent.Future[Any]. Unspecified value parameter timeout. val future3:Future[String]= ask(result ,Message).mapTo[String]