What's Changed
Supports ZIO v2.0.0-RC3
Highlights
Request Streaming
private val app = Http.collect[Request] {
case req @ Method.POST -> !! / "echo" =>
Response(data = HttpData.fromStream(req.bodyAsStream))
}
💥 Breaking Changes
Http.Status
names to Camel Case
Status.OK
-> Status.Ok
Http.getResource
consistent with ZStream.fromResource
val httpApp = Http.fromResource("TestFile.js")
- Client and Server Request merged
val clientRequest = Request(url = url, method = Method.GET, headers = headers )
Version
added in the Request
val req = Request(Version.`HTTP/1.1`, Method.GET, URL(!!))
🚀 Features
- Feature: Bearer auth middleware @dinojohn (#1097)
- Feature: Support Custom statuses code @gciuloaica (#1121)
- Feature: Add
version
to Request
@amitksingh1490 (#1094)
- Feature: Introduced defect channel for
Http
@nartamonov (#1083)
- Feature: Request Streaming @amitksingh1490 (#1048)
- Feature: Added helper checkers to
Status
class @rleibman (#1058)
- Feature: Server Request Decompression @girdharshubham (#1095)
- Feature: Effectful Auth Middleware @dinojohn (#1079)
- Feature: Add
when
operator in Http
@ShrutiVerma97 (#1078)
- Feature: Added new constructor in http @ShrutiVerma97 (#1077)
- Feature: Add more useful toString method for Request @nartamonov (#995)
- Feature: Add middleware.codecHttp @tusharmath (#1141)
- Feature: Add narrow operator to http @tusharmath (#1161)
- Feature: Add toHttp method to Response @tusharmath (#1160)
- Enhancement: Added combine operator @ShrutiVerma97 (#1106)
- Enhancement: Merge server and client Responses @amitksingh1490 (#1111)
🔨 Improvements
- Refactor: Make
Http.getResource
consistent with ZStream.fromResource
@guizmaii (#1113)
- Refactor: Http.Status names to Camel Case @tusharmath (#1129)
- Refactor: Merge client and server
Request
@amitksingh1490 (#1125)
- Refactor: Server Settings Support in
HttpRunnableSpec#serve
@girdharshubham (#1053)
- Refactor: Website docs sidebar pages repositioned @girdharshubham (#1049)
- Refactor: Merge client and server
Request
@amitksingh1490 (#1125)
- Refactor:
Request
and Response
to extend HttpDataExtension
@amitksingh1490 (#1112)
- Refactor: DynamicServer is not bound to HttpEnv only @tusharmath (#1159)
- Refactor: Added lift in PartialCollect @ShrutiVerma97 (#1105)
- Refactor: Added lift in PartialCollect @ShrutiVerma97 (#1105)
- Performance: Improve HttpData toByteBuf @tusharmath @amitksingh1490 (#1137)
- Performance: Use CharSequence wherever possible @tusharmath (#1142)
🐛 Bug Fixes
- Fix: Fix request scala doc @kaushik143 (#1138)
- Fix:
toByteBuf
for streamed HttpData @ex0ns (#1118)
- Fix: Capture synchronous defects inside Handler @dinojohn (#1099)
- Fix: Handle HttpClient Interruption on connection close @gciuloaica (#1039)
- Fix: Socket.end implementation @tusharmath (#1158)
- Fix: toHttp FromASCIIString by @amitksingh1490 in (#1176)
🧰 Maintenance
- Test: Removed flatten from test @ShrutiVerma97 (#1109)
- Example: More secure string compare for login @MasseGuillaume (#1120)
- Website: Rename getBodyAsString => bodyAsString in doc @MasseGuillaume (#1124)
- Website: New chapter: efficient development process @DaniRey (#1145)
- Website: Restop @DaniRey (#1146)
- Update netty-incubator-transport-native-io_uring to 0.0.13.Final @scala-steward (#1133)
- Update netty-all to 4.1.75.Final @scala-steward (#1130)
- Update scala-collection-compat to 2.7.0 @scala-steward (#1154)
- Update jwt-core to 9.0.5 @scala-steward (#1150)
- Update sbt-scala3-migrate to 0.5.1 @scala-steward (#1163)
- Upgrade to ZIO 2.0.0-RC3 by @adamgfraser in (#1152 , #1174 )
New Contributors
- @rleibman made their first contribution in https://github.com/dream11/zio-http/pull/1058
- @ex0ns made their first contribution in https://github.com/dream11/zio-http/pull/1118
- @MasseGuillaume made their first contribution in https://github.com/dream11/zio-http/pull/1120
- @nartamonov made their first contribution in https://github.com/dream11/zio-http/pull/1083
- @guizmaii made their first contribution in https://github.com/dream11/zio-http/pull/1113
- @DaniRey made their first contribution in https://github.com/dream11/zio-http/pull/1145
Full Changelog: https://github.com/dream11/zio-http/compare/v2.0.0-RC4...v2.0.0-RC5