Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: zio-http 0.0.4 #2702

Merged
merged 5 commits into from
Jan 27, 2023
Merged

chore: zio-http 0.0.4 #2702

merged 5 commits into from
Jan 27, 2023

Conversation

frekw
Copy link
Contributor

@frekw frekw commented Jan 27, 2023

Hey!

zio-http changed quite a bit between 0.0.4 and 0.0.3, mainly separating Routes from Handlers. The difference is basically that a Route is a PartialFunction[Request, Handler[R, E, In, Out], i.e can choose to handle or not handle an incoming request.

It also introduces a new concept of an App that is what we can serve via a server. App is a special case of a Handler[-R, Response, Request, Response], i.e the error we return needs to be a valid HTTP Response. In order to convert between the two there's a convenience function Http#withDefaultErrorResponse that handles errors as a 500 response.

This also re-adds 2.12 support for zio-http now that zio/zio-http#1813 is fixed.

@frekw frekw force-pushed the chore/zio-http-0.0.4 branch from 85f7e79 to 93ca6a5 Compare January 27, 2023 12:14
@frekw
Copy link
Contributor Author

frekw commented Jan 27, 2023

MiMa checks failing, @adamw not sure how you feel about that given that zio-http is still at 0.0.4?

@frekw
Copy link
Contributor Author

frekw commented Jan 27, 2023

The MiMa failures seem to be related to network errors, but I expect them to fail since I renamed toHttp to toApp to be more inline with zio-http's new APIs.

@frekw
Copy link
Contributor Author

frekw commented Jan 27, 2023

Darn, 2.12 still doesn't work. :/

object NettyDriver in package server cannot be accessed in package zio.http.netty.server
[error]           NettyDriver.manual,

@adamw
Copy link
Member

adamw commented Jan 27, 2023

Thanks! MiMA only applies to core. And don't worry about native/3, it's really unstable

@adamw adamw merged commit 876837c into softwaremill:master Jan 27, 2023
@frekw frekw deleted the chore/zio-http-0.0.4 branch January 27, 2023 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants