Skip to content

0.2.0

Compare
Choose a tag to compare
@eed3si9n eed3si9n released this 09 Jan 12:05
· 134 commits to develop since this release
v0.2.0

AHC 2.0 and (experimental) Akka HTTP backend

Gigahorse 0.2.0 abstracts over two HTTP backends.
@alexdupre contributed migration from AHC 1.9 to AHC 2.0, which is based on Netty 4 in #12.

There's now also an experimental Akka HTTP support. #15 by @eed3si9n

WebSocket support

@alexdupre also contributed WebSocket support.

Async processing with Reactive Stream

Thanks to Lightbend implementing Reactive Stream on both Akka HTTP and AHC #963, Gigahorse can abstract over both backends as Reactive Stream of byte or String stream.
The stream processing is provided using http.runStream(r, f).

import gigahorse._, support.akkahttp.Gigahorse
import scala.concurrent._, duration._

Gigahorse.withHttp(Gigahorse.config) { http =>
  val r = Gigahorse.url("http://localhost:8000/README.markdown").get
  val f = http.runStream(r, Gigahorse.asStringStream andThen { xs =>
    xs.foreach { s => println(s) }
  })
  Await.result(f, 120.seconds)
}

#16 by @eed3si9n