-
Notifications
You must be signed in to change notification settings - Fork 374
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
Refactor: Remove type params from HttpData #766
Conversation
Codecov Report
@@ Coverage Diff @@
## main #766 +/- ##
==========================================
+ Coverage 49.63% 49.83% +0.19%
==========================================
Files 69 69
Lines 2069 2067 -2
Branches 52 55 +3
==========================================
+ Hits 1027 1030 +3
+ Misses 1042 1037 -5
Continue to review full report at Codecov.
|
* Creates a Http that always succeeds with a 200 status code and the provided ZStream as the body | ||
*/ | ||
def fromStream[R](stream: ZStream[R, Throwable, Byte]): HttpApp[R, Nothing] = | ||
Http.fromEffect(ZIO.environment[R].map(r => Http.fromData(HttpData.fromStream(stream.provide(r))))).flatten |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure what will be the impact on Performance here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will need to benchmark this. Irrespective of that, in production people will use provide anyways at places.
Co-authored-by: Amit Kumar Singh <amit.singh@dream11.com>
HttpData was unnecessary complex with type-parameters. This also help in our final goal of ultimately removing type-params from Response.
Feature
fromStream
operator toHttp