Use http4s in your browser with Scala.js! Check out the live example in the docs.
Features:
- A
Client
implementation backed byfetch
- A
Service Worker
integration to install yourHttpRoutes
as aFetchEvent
handler - Encoders for
File
,Blob
andReadableStream
Notably, http4s-dom can also be used to create serverless apps with Cloudflare Workers which have adopted the same APIs used in the browser!
// Supports http4s 0.23.x and scala-js-dom 2.x
libraryDependencies += "org.http4s" %%% "http4s-dom" % "0.2.0"
// Or, for compatibility with scala-js-dom 1.x
libraryDependencies += "org.http4s" %%% "http4s-dom" % "0.1.0"