def resolve(url: String): Future[WSResponse] = ws.url(url).withFollowRedirects(true).get()
def validateAllLinks(links: List[String]) = ???
How would you solve the second function?
I have tried traverse, Future.sequence, Await ...
This was my most recent try:
def validateAllLinks(links: List[String]) = links.map(link =>
Await.result(resolve(link), Duration.create(3, TimeUnit.SECONDS))
)
The problem with this approach:
i get TimeoutExceptions and MaxRedirectException that i don't want to try/catch
I don't think the solution would be concurrent, even if it worked.
Thanks in advance!