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

Endpoint api en-/decodes based on accept header #2366

Merged
merged 16 commits into from
Aug 15, 2023

Conversation

987Nabil
Copy link
Contributor

@987Nabil 987Nabil commented Aug 4, 2023

The default codec is still json. Only added support for protobuf and plain text.

fixes #1506
/claim #1506

@codecov-commenter
Copy link

codecov-commenter commented Aug 4, 2023

Codecov Report

Patch coverage: 61.26% and project coverage change: -0.03% ⚠️

Comparison is base (27289ca) 63.04% compared to head (7a9043f) 63.01%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2366      +/-   ##
==========================================
- Coverage   63.04%   63.01%   -0.03%     
==========================================
  Files         136      137       +1     
  Lines        7035     7101      +66     
  Branches     1242     1257      +15     
==========================================
+ Hits         4435     4475      +40     
- Misses       2600     2626      +26     
Files Changed Coverage Δ
zio-http/src/main/scala/zio/http/Request.scala 46.15% <0.00%> (-1.22%) ⬇️
...p/src/main/scala/zio/http/codec/HeaderCodecs.scala 95.69% <ø> (ø)
...src/main/scala/zio/http/codec/HttpCodecError.scala 100.00% <ø> (ø)
...main/scala/zio/http/codec/internal/BodyCodec.scala 36.36% <0.00%> (-16.97%) ⬇️
...scala/zio/http/codec/internal/MediaTypeCodec.scala 31.57% <31.57%> (ø)
...n/scala/zio/http/endpoint/EndpointMiddleware.scala 72.91% <57.14%> (-1.51%) ⬇️
...http/src/main/scala/zio/http/codec/HttpCodec.scala 54.37% <88.23%> (+2.69%) ⬆️
...scala/zio/http/codec/internal/EncoderDecoder.scala 94.08% <91.89%> (+9.37%) ⬆️
zio-http/src/main/scala/zio/http/MediaType.scala 96.42% <100.00%> (+0.13%) ⬆️
...o-http/src/main/scala/zio/http/ZClientAspect.scala 66.66% <100.00%> (+2.66%) ⬆️
... and 2 more

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jdegoes
Copy link
Member

jdegoes commented Aug 7, 2023

@987Nabil Can you fix conflicts then will be good to merge? 🙏

@987Nabil 987Nabil force-pushed the accept-header-endpoint-new branch from 21b04a2 to 7a9043f Compare August 15, 2023 12:02
@jdegoes jdegoes merged commit 020f6f9 into zio:main Aug 15, 2023
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.

Properly support content type headers in zio.http.api
3 participants