v1.0.0.0-RC23
github-actions
released this
26 Jan 12:46
·
1144 commits
to main
since this release
Highlights
- Support middlewares on Http
val middlewares: HttpMiddleware[Console with Clock, IOException] =
// print debug info about request and response
Middleware.debug ++
// close connection if request takes more than 3 seconds
Middleware.timeout(3 seconds) ++
// add static header
Middleware.addHeader("X-Environment", "Dev")
💥 Breaking Changes
- Rename
ClientParams
toClientRequest
final case class ClientRequest(
method: Method,
url: URL,
getHeaders: Headers = Headers.empty,
data: HttpData = HttpData.empty,
private val channelContext: ChannelHandlerContext = null,
) extends HeaderExtension[ClientRequest]
- Constructor names updated as per ZIO 2
def fromZIO[R, E, A](z: ZIO[R, E, A]): HExit[R, E, A] = Effect(z.mapError(Option(_)))
def toZIO: ZIO[R, Option[E], A] = self match {
case HExit.Success(a) => ZIO.succeed(a)
case HExit.Failure(e) => ZIO.fail(Option(e))
case HExit.Empty => ZIO.fail(None)
case HExit.Effect(zio) => zio
}
Changes
🚀 Features
- Feature: Signed Cookie by @ShrutiVerma97 (#751)
- Feature: API to modify headers by @ShrutiVerma97 (#824)
- Feature: Add builder methods for
Server
by @jgoday (#768) - Feature: Add host in client from absolute URL @kaushik143 (#847)
🐛 Bug Fixes
- Fix: EncodeClientParams @ShrutiVerma97 (#868)
- Fix: HasHeader bug by @gciuloaica (#835)
- Fix: Echo streaming by @amitksingh1490 (#828)
🧰 Maintenance
- Performance: Improve benchmarking code by @tusharmath (#731)
- Test: Added Integration tests for
HExit.Success
@zsfVishnu-d11 (#852) - Refactor: HttpRunnableSpec clean up @tusharmath (#857)
- Refactor: Support middlewares on Http by @tusharmath (#773)
- Refactor: Rename
ClientParams
toClientRequest
@tusharmath (#856) - Refactor: update constructor names as per ZIO 2 by @tusharmath (#839)
- Refactor: use declarative encoding for http.middleware @brendo-m (#869)
- Refactor: Html template for internal server error string by @girdharshubham (#851)
- Docs: Fix Documentation @tusharmath (#897)
- Docs:
Headers
documentation @gciuloaica (#817) - Docs: Update Basic Examples by @ShrutiVerma97 (#814)
- Docs: Update advanced examples by @ShrutiVerma97 (#816)
- Docs: Move docs to v1.x directory @amitksingh1490 (#861)
- Update scalafmt-core to 3.3.3 @amitksingh1490 (#884)
- Update sbt-bloop to 1.4.12 by @amitksingh1490 (#810)
- Update scala3-library to 3.1.1 @amitksingh1490 (#873)
- Update sbt-scalafix to 0.9.34 by @amitksingh1490 (#805)
- Update scala-library to 2.13.8 by @amitksingh1490 (#801)
- Update netty-all to 4.1.73.Final by @amitksingh1490 (#811)
New Contributors
- @zsfVishnu-d11 made their first contribution (#852)