=docs #17600 fix incorrect http client example
This commit is contained in:
parent
e70b8c3e48
commit
7498533509
1 changed files with 2 additions and 2 deletions
|
|
@ -22,7 +22,7 @@ class HttpClientExampleSpec extends WordSpec with Matchers {
|
|||
implicit val materializer = ActorFlowMaterializer()
|
||||
|
||||
val connectionFlow: Flow[HttpRequest, HttpResponse, Future[Http.OutgoingConnection]] =
|
||||
Http().outgoingConnection("http://akka.io")
|
||||
Http().outgoingConnection("akka.io")
|
||||
val responseFuture: Future[HttpResponse] =
|
||||
Source.single(HttpRequest(uri = "/"))
|
||||
.via(connectionFlow)
|
||||
|
|
@ -44,7 +44,7 @@ class HttpClientExampleSpec extends WordSpec with Matchers {
|
|||
implicit val materializer = ActorFlowMaterializer()
|
||||
|
||||
// construct a pool client flow with context type `Int`
|
||||
val poolClientFlow = Http().cachedHostConnectionPool[Int]("http://akka.io")
|
||||
val poolClientFlow = Http().cachedHostConnectionPool[Int]("akka.io")
|
||||
val responseFuture: Future[(Try[HttpResponse], Int)] =
|
||||
Source.single(HttpRequest(uri = "/") -> 42)
|
||||
.via(poolClientFlow)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue