Migrate from Blaze to Ember
This commit is contained in:
@@ -3,9 +3,9 @@ package fetch
|
||||
import cats.effect._
|
||||
import cats.implicits._
|
||||
import org.http4s._
|
||||
import org.http4s.blaze.client.BlazeClientBuilder
|
||||
import org.http4s.client.Client
|
||||
import org.http4s.headers.Authorization
|
||||
import org.http4s.ember.client.EmberClientBuilder
|
||||
|
||||
import pureconfig._
|
||||
import pureconfig.generic.auto._
|
||||
@@ -45,7 +45,7 @@ object FetchService {
|
||||
|
||||
private def fetchFiles(fileNames: List[String]): IO[List[Either[Throwable, (String, String)]]] = {
|
||||
val IOUrls = baseUrl.map(baseUrl => fileNames.map(baseUrl / _))
|
||||
BlazeClientBuilder[IO](global).resource.use { client =>
|
||||
EmberClientBuilder.default[IO].build.use { client =>
|
||||
IOUrls.flatMap(_.traverse(url => makeRequest(client, url)))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user