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

ZIO 2 support #809

Merged
merged 7 commits into from
Jan 13, 2022
Merged

ZIO 2 support #809

merged 7 commits into from
Jan 13, 2022

Conversation

jdegoes
Copy link
Member

@jdegoes jdegoes commented Jan 12, 2022

Web socket tests are temporarily disabled as sttp does not support ZIO 2.

@codecov-commenter
Copy link

Codecov Report

Merging #809 (548ca78) into main (2f0eb65) will decrease coverage by 1.80%.
The diff coverage is 44.44%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #809      +/-   ##
==========================================
- Coverage   52.01%   50.21%   -1.81%     
==========================================
  Files          69       69              
  Lines        2082     2091       +9     
  Branches       65       60       -5     
==========================================
- Hits         1083     1050      -33     
- Misses        999     1041      +42     
Impacted Files Coverage Δ
zio-http/src/main/scala/zhttp/http/Cookie.scala 68.22% <ø> (ø)
zio-http/src/main/scala/zhttp/http/Response.scala 68.96% <0.00%> (-10.35%) ⬇️
.../scala/zhttp/http/headers/HeaderConstructors.scala 20.48% <ø> (ø)
...main/scala/zhttp/http/headers/HeaderModifier.scala 11.76% <ø> (ø)
...io-http/src/main/scala/zhttp/service/Handler.scala 43.75% <ø> (ø)
...la/zhttp/service/client/ClientInboundHandler.scala 71.42% <0.00%> (ø)
...io-http/src/main/scala/zhttp/service/package.scala 100.00% <ø> (ø)
...ala/zhttp/service/server/ServerSocketHandler.scala 0.00% <0.00%> (-30.77%) ⬇️
...o-http/src/main/scala/zhttp/socket/SocketApp.scala 0.00% <0.00%> (-26.48%) ⬇️
...p/src/main/scala/zhttp/socket/SocketProtocol.scala 0.00% <ø> (-26.09%) ⬇️
... and 19 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2f0eb65...548ca78. Read the comment docs.

@tusharmath tusharmath changed the base branch from main to zio-series/2.x January 12, 2022 12:18
@jdegoes
Copy link
Member Author

jdegoes commented Jan 12, 2022

I think the benchmarks are expected to not pass, but please let me know if I'm missing something there (i.e. a generalization that would let them pass with a non-main branch).

@amitksingh1490
Copy link
Collaborator

I think the benchmarks are expected to not pass, but please let me know if I'm missing something there (i.e. a generalization that would let them pass with a non-main branch).

Yes benchmarks fail on forked PR please ignore #619

@tusharmath
Copy link
Collaborator

@jdegoes Thanks!

We can merge this PR and make sure it's updated with every change in the main branch. The websocket client work is being developed in #794 and should be out soon so we won't need to have sttp dependency.

Would you require a maven release also? The challenge that I see could be with versioning since ZIO http is still in RC.

@jdegoes
Copy link
Member Author

jdegoes commented Jan 12, 2022

@tusharmath Yes, I need a Maven release, and it will help the ecosystem as well to have something available for testing.

This is my first PR (based on @kitlangton and @adamfraser's work), but expect many more to come!

@jdegoes
Copy link
Member Author

jdegoes commented Jan 12, 2022

I would suggest for versioning we do: ZIO HTTP 2.0-RC. So there will exist the ZIO HTTP 1.x line, and the ZIO HTTP 2.x line. Obviously folks will continue using 1.x for around 6 months but the future will be 2.x

@amitksingh1490 amitksingh1490 enabled auto-merge (squash) January 13, 2022 11:32
@amitksingh1490 amitksingh1490 merged commit 24f80a8 into zio:zio-series/2.x Jan 13, 2022
amitksingh1490 pushed a commit that referenced this pull request Jan 14, 2022
* upgrade to zio 2.0.0-RC1

* bump timeout for failing test

* other fixes

* increase timeout

* rejigger broken test

* try, try again

* get compiling & tests passing

Co-authored-by: Kit Langton <kit.langton@gmail.com>
amitksingh1490 pushed a commit that referenced this pull request Jan 14, 2022
* upgrade to zio 2.0.0-RC1

* bump timeout for failing test

* other fixes

* increase timeout

* rejigger broken test

* try, try again

* get compiling & tests passing

Co-authored-by: Kit Langton <kit.langton@gmail.com>
tusharmath pushed a commit that referenced this pull request Jan 15, 2022
* Doc: Add outline (#815)

* doc: add categories

* refactor: doc structure refactored

* fix: package-lock.json removed

* refactor: create outline sub-directories

* refactor: rename test to testing

* Update netty-all to 4.1.73.Final (#811)

* Feature: API to modify headers (#824)

* feat(Headers):added new api to update headers

* renamed api

* Feature: Signed Cookie (#751)

* feat(cookie): added secret in cookie

* feat(cookie): added signcookie middleware

* feat(cookie): scalafmt

* fix(cookie): sign cookie while encoding

* scalafmt

* fix(Cookie): added unsign method for cookie

* fix(cookie): minor changes

* fix(signCookieMiddleware: simplified signCookies

* fix(cookie): removed try catch from signContent

* cookie: throw error in verify

* cookie: throw error in verify

* verify method changes

* fixed test cases

* fix: removed decodeResponseSignedCookie

* fix: middlewareSpec

* added modifyheaders in middleware

* removed unwanted changes

* scalafmt

* refactoring

* refactoring

* build fix

* build fix

* fix: decodeResponseCookie

* added modify

* Update sbt-scalafix to 0.9.34 (#805)

* Fix: Echo streaming (#828)

* Failing test

* Fix echo streaming

* Pr Comments

* ZIO 2 support (#809)

* upgrade to zio 2.0.0-RC1

* bump timeout for failing test

* other fixes

* increase timeout

* rejigger broken test

* try, try again

* get compiling & tests passing

Co-authored-by: Kit Langton <kit.langton@gmail.com>

* ZIO2 changes

* scalafmt

* renamed

Co-authored-by: Shubham Girdhar <girdharshubham@hotmail.com>
Co-authored-by: Shruti Verma <62893271+ShrutiVerma97@users.noreply.github.com>
Co-authored-by: John A. De Goes <john@degoes.net>
Co-authored-by: Kit Langton <kit.langton@gmail.com>
@jdegoes jdegoes deleted the zio-2 branch January 19, 2022 16:50
jdegoes added a commit to jdegoes/zio-http that referenced this pull request Jan 19, 2022
* upgrade to zio 2.0.0-RC1

* bump timeout for failing test

* other fixes

* increase timeout

* rejigger broken test

* try, try again

* get compiling & tests passing

Co-authored-by: Kit Langton <kit.langton@gmail.com>
jdegoes added a commit to jdegoes/zio-http that referenced this pull request Jan 19, 2022
* Doc: Add outline (zio#815)

* doc: add categories

* refactor: doc structure refactored

* fix: package-lock.json removed

* refactor: create outline sub-directories

* refactor: rename test to testing

* Update netty-all to 4.1.73.Final (zio#811)

* Feature: API to modify headers (zio#824)

* feat(Headers):added new api to update headers

* renamed api

* Feature: Signed Cookie (zio#751)

* feat(cookie): added secret in cookie

* feat(cookie): added signcookie middleware

* feat(cookie): scalafmt

* fix(cookie): sign cookie while encoding

* scalafmt

* fix(Cookie): added unsign method for cookie

* fix(cookie): minor changes

* fix(signCookieMiddleware: simplified signCookies

* fix(cookie): removed try catch from signContent

* cookie: throw error in verify

* cookie: throw error in verify

* verify method changes

* fixed test cases

* fix: removed decodeResponseSignedCookie

* fix: middlewareSpec

* added modifyheaders in middleware

* removed unwanted changes

* scalafmt

* refactoring

* refactoring

* build fix

* build fix

* fix: decodeResponseCookie

* added modify

* Update sbt-scalafix to 0.9.34 (zio#805)

* Fix: Echo streaming (zio#828)

* Failing test

* Fix echo streaming

* Pr Comments

* ZIO 2 support (zio#809)

* upgrade to zio 2.0.0-RC1

* bump timeout for failing test

* other fixes

* increase timeout

* rejigger broken test

* try, try again

* get compiling & tests passing

Co-authored-by: Kit Langton <kit.langton@gmail.com>

* ZIO2 changes

* scalafmt

* renamed

Co-authored-by: Shubham Girdhar <girdharshubham@hotmail.com>
Co-authored-by: Shruti Verma <62893271+ShrutiVerma97@users.noreply.github.com>
Co-authored-by: John A. De Goes <john@degoes.net>
Co-authored-by: Kit Langton <kit.langton@gmail.com>
jdegoes added a commit to jdegoes/zio-http that referenced this pull request Jan 19, 2022
* upgrade to zio 2.0.0-RC1

* bump timeout for failing test

* other fixes

* increase timeout

* rejigger broken test

* try, try again

* get compiling & tests passing

Co-authored-by: Kit Langton <kit.langton@gmail.com>
jdegoes added a commit to jdegoes/zio-http that referenced this pull request Jan 19, 2022
* Doc: Add outline (zio#815)

* doc: add categories

* refactor: doc structure refactored

* fix: package-lock.json removed

* refactor: create outline sub-directories

* refactor: rename test to testing

* Update netty-all to 4.1.73.Final (zio#811)

* Feature: API to modify headers (zio#824)

* feat(Headers):added new api to update headers

* renamed api

* Feature: Signed Cookie (zio#751)

* feat(cookie): added secret in cookie

* feat(cookie): added signcookie middleware

* feat(cookie): scalafmt

* fix(cookie): sign cookie while encoding

* scalafmt

* fix(Cookie): added unsign method for cookie

* fix(cookie): minor changes

* fix(signCookieMiddleware: simplified signCookies

* fix(cookie): removed try catch from signContent

* cookie: throw error in verify

* cookie: throw error in verify

* verify method changes

* fixed test cases

* fix: removed decodeResponseSignedCookie

* fix: middlewareSpec

* added modifyheaders in middleware

* removed unwanted changes

* scalafmt

* refactoring

* refactoring

* build fix

* build fix

* fix: decodeResponseCookie

* added modify

* Update sbt-scalafix to 0.9.34 (zio#805)

* Fix: Echo streaming (zio#828)

* Failing test

* Fix echo streaming

* Pr Comments

* ZIO 2 support (zio#809)

* upgrade to zio 2.0.0-RC1

* bump timeout for failing test

* other fixes

* increase timeout

* rejigger broken test

* try, try again

* get compiling & tests passing

Co-authored-by: Kit Langton <kit.langton@gmail.com>

* ZIO2 changes

* scalafmt

* renamed

Co-authored-by: Shubham Girdhar <girdharshubham@hotmail.com>
Co-authored-by: Shruti Verma <62893271+ShrutiVerma97@users.noreply.github.com>
Co-authored-by: John A. De Goes <john@degoes.net>
Co-authored-by: Kit Langton <kit.langton@gmail.com>
tusharmath added a commit that referenced this pull request Jan 19, 2022
* Doc: Add outline (#815)

* doc: add categories

* refactor: doc structure refactored

* fix: package-lock.json removed

* refactor: create outline sub-directories

* refactor: rename test to testing

* Docs: Update Basic Examples (#814)

* doc(Getting started): updated examples

* docs: updated basic examples

* docs: update advanced examples (#816)

* maintenance: semanticdb revision usage (#832)

* maintenance: workflow scala version (#833)

* Fix: HasHeader bug (#835)

* #834 - fix and test for the bug.

* applied suggested change

* refactor: fix naming for Http operators (#839)

* Update sbt-bloop to 1.4.12 (#810)

* Update sbt-bloop to 1.4.12

* Update sbt-bloop to 1.4.12

* Update scala-library to 2.13.8 (#801)

* Update scala-library to 2.13.8

* Regenerate workflow with sbt-github-actions

* Add configuration builder methods to zhttp.service.Server (#768)

* Add configuration builder methods to zhttp.service.Server

* Update zio-http/src/main/scala/zhttp/service/Server.scala

Co-authored-by: Tushar Mathur <tusharmath@gmail.com>

* Update zio-http/src/main/scala/zhttp/service/Server.scala

Co-authored-by: Tushar Mathur <tusharmath@gmail.com>

* Update zio-http/src/main/scala/zhttp/service/Server.scala

Co-authored-by: Tushar Mathur <tusharmath@gmail.com>

* Change some server with* builder methods (enable parameter)

* Server withAcceptContinue(enabled)

Co-authored-by: Tushar Mathur <tusharmath@gmail.com>

* maintenance: html template for internal server error string (#851)

Closes #842

* Performance: Improve benchmarking code (#731)

* wip: try server codec without validation

* wip: remove flush consolidator

* wip: use wrapped buffer

* wip: add flush consolidator

* perf: make response encoding checks faster

* use encoder and decoder (#733)

* wip: remove Request creation

* use encoder and decoder

Co-authored-by: Tushar Mathur <tusharmath@gmail.com>

* disable object aggregator

* disable object aggregator

* revert disable object aggregator

* doc: update scala doc

* perf: freeze the HttpResponse

Co-authored-by: Amit Kumar Singh <amit.singh@dream11.com>
Co-authored-by: amitsingh <amitksingh1490@gmail.com>

* Refactor: Support middlewares on Http (#773)

* refactor: remove type-params from Response

* chore: self review

* refactor: rename Middleware to HttpMiddleware

* refactor: add `@@@` to Http as an alternative to `@@`.

* feature: add new Middleware API

* feature: add `flatten` and `ifThenElse`

* feature: add `ifThenElseZIO`

* refactor: fix type params for `identity`

* feature: add `when`

* feature: add `make` constructor

* refactor: make middleware methods final

* refactor: git remains

* refactor: implement HttpMiddleware as Middleware

* scala3 fix

* Refactor CORS middleware (#788)

* Refactor/merge middleware and http middleware (#790)

* Refactor move cors and timeout

* move some httpMiddlewares to Middleware

* move some AuthMiddleware to Middleware

* move remaining AuthMiddleware to Middleware

* move Middlewares to middleware package

* scaladoc

* codec example

* move Middleware to http package

* named alias for `@@`

* rename Auth to AuthMiddlewares

* rename CORSMiddleware to CorsMiddlewares

* rename CSRF to CsrfMiddlewares

* make primitives private

* rename MiddlewareExtensions to HttpMiddlewares

* rename operators in HttpMiddlewares

* scalaDoc

* arg rename

* doc update and general refactor

* simplify cors middleware

* rename CorsConfig

* renames

* Make middlewares package private MiddlewareRequest

* Introduce MiddlewareRequest (#798)

* Introduce MiddlewareRequest

* PR review comments

* Refactor move runAfter to Middleware

* refactor: add `UMiddleware`

* feature: add `contramapZIO`

* refactor: move cors config to Cors file

* refactor: rename files

* refactor: remove AuthSpec from WebSpec

* refactor: fix naming for Http operators

* refactor: add partial type suport for contraMapZIO

* Refactor: Codec (#841)

* Add Run Before (#840)

* Add Run Before

* Add Run Before and After

* use renamed operator

* refactor: add partial type suport for contraMap

* Implement missing operators in Middleware (#807)

* Implement missing operators in Middleware

* fix as operator

* headers Middleware changes

* sign cookie

* extend with HeaderExtensions

* rename suite

* PR comments

* refactor: use `Request` instead of `MiddlewareRequest`

* refactor: rename methods

* refactor: resolve fix me issue

Co-authored-by: amitsingh <amitksingh1490@gmail.com>
Co-authored-by: Amit Kumar Singh <amit.singh@dream11.com>

* ZIO 2 support (#809)

* upgrade to zio 2.0.0-RC1

* bump timeout for failing test

* other fixes

* increase timeout

* rejigger broken test

* try, try again

* get compiling & tests passing

Co-authored-by: Kit Langton <kit.langton@gmail.com>

* Delete commented websocket tests (#826)

* Backmerge main 14 jan 2021 (#831)

* Doc: Add outline (#815)

* doc: add categories

* refactor: doc structure refactored

* fix: package-lock.json removed

* refactor: create outline sub-directories

* refactor: rename test to testing

* Update netty-all to 4.1.73.Final (#811)

* Feature: API to modify headers (#824)

* feat(Headers):added new api to update headers

* renamed api

* Feature: Signed Cookie (#751)

* feat(cookie): added secret in cookie

* feat(cookie): added signcookie middleware

* feat(cookie): scalafmt

* fix(cookie): sign cookie while encoding

* scalafmt

* fix(Cookie): added unsign method for cookie

* fix(cookie): minor changes

* fix(signCookieMiddleware: simplified signCookies

* fix(cookie): removed try catch from signContent

* cookie: throw error in verify

* cookie: throw error in verify

* verify method changes

* fixed test cases

* fix: removed decodeResponseSignedCookie

* fix: middlewareSpec

* added modifyheaders in middleware

* removed unwanted changes

* scalafmt

* refactoring

* refactoring

* build fix

* build fix

* fix: decodeResponseCookie

* added modify

* Update sbt-scalafix to 0.9.34 (#805)

* Fix: Echo streaming (#828)

* Failing test

* Fix echo streaming

* Pr Comments

* ZIO 2 support (#809)

* upgrade to zio 2.0.0-RC1

* bump timeout for failing test

* other fixes

* increase timeout

* rejigger broken test

* try, try again

* get compiling & tests passing

Co-authored-by: Kit Langton <kit.langton@gmail.com>

* ZIO2 changes

* scalafmt

* renamed

Co-authored-by: Shubham Girdhar <girdharshubham@hotmail.com>
Co-authored-by: Shruti Verma <62893271+ShrutiVerma97@users.noreply.github.com>
Co-authored-by: John A. De Goes <john@degoes.net>
Co-authored-by: Kit Langton <kit.langton@gmail.com>

* Merge

Co-authored-by: Shubham Girdhar <girdharshubham@hotmail.com>
Co-authored-by: Shruti Verma <62893271+ShrutiVerma97@users.noreply.github.com>
Co-authored-by: Gabriel Ciuloaica <95849448+gciuloaica@users.noreply.github.com>
Co-authored-by: Tushar Mathur <tushar@dream11.com>
Co-authored-by: Amit Kumar Singh <amit.singh@dream11.com>
Co-authored-by: Javier Goday <jgoday@gmail.com>
Co-authored-by: Tushar Mathur <tusharmath@gmail.com>
Co-authored-by: amitsingh <amitksingh1490@gmail.com>
Co-authored-by: Kit Langton <kit.langton@gmail.com>
amitksingh1490 pushed a commit that referenced this pull request Feb 9, 2022
* upgrade to zio 2.0.0-RC1

* bump timeout for failing test

* other fixes

* increase timeout

* rejigger broken test

* try, try again

* get compiling & tests passing

Co-authored-by: Kit Langton <kit.langton@gmail.com>
amitksingh1490 pushed a commit that referenced this pull request Feb 9, 2022
* Doc: Add outline (#815)

* doc: add categories

* refactor: doc structure refactored

* fix: package-lock.json removed

* refactor: create outline sub-directories

* refactor: rename test to testing

* Update netty-all to 4.1.73.Final (#811)

* Feature: API to modify headers (#824)

* feat(Headers):added new api to update headers

* renamed api

* Feature: Signed Cookie (#751)

* feat(cookie): added secret in cookie

* feat(cookie): added signcookie middleware

* feat(cookie): scalafmt

* fix(cookie): sign cookie while encoding

* scalafmt

* fix(Cookie): added unsign method for cookie

* fix(cookie): minor changes

* fix(signCookieMiddleware: simplified signCookies

* fix(cookie): removed try catch from signContent

* cookie: throw error in verify

* cookie: throw error in verify

* verify method changes

* fixed test cases

* fix: removed decodeResponseSignedCookie

* fix: middlewareSpec

* added modifyheaders in middleware

* removed unwanted changes

* scalafmt

* refactoring

* refactoring

* build fix

* build fix

* fix: decodeResponseCookie

* added modify

* Update sbt-scalafix to 0.9.34 (#805)

* Fix: Echo streaming (#828)

* Failing test

* Fix echo streaming

* Pr Comments

* ZIO 2 support (#809)

* upgrade to zio 2.0.0-RC1

* bump timeout for failing test

* other fixes

* increase timeout

* rejigger broken test

* try, try again

* get compiling & tests passing

Co-authored-by: Kit Langton <kit.langton@gmail.com>

* ZIO2 changes

* scalafmt

* renamed

Co-authored-by: Shubham Girdhar <girdharshubham@hotmail.com>
Co-authored-by: Shruti Verma <62893271+ShrutiVerma97@users.noreply.github.com>
Co-authored-by: John A. De Goes <john@degoes.net>
Co-authored-by: Kit Langton <kit.langton@gmail.com>
amitksingh1490 added a commit that referenced this pull request Feb 9, 2022
* Doc: Add outline (#815)

* doc: add categories

* refactor: doc structure refactored

* fix: package-lock.json removed

* refactor: create outline sub-directories

* refactor: rename test to testing

* Docs: Update Basic Examples (#814)

* doc(Getting started): updated examples

* docs: updated basic examples

* docs: update advanced examples (#816)

* maintenance: semanticdb revision usage (#832)

* maintenance: workflow scala version (#833)

* Fix: HasHeader bug (#835)

* #834 - fix and test for the bug.

* applied suggested change

* refactor: fix naming for Http operators (#839)

* Update sbt-bloop to 1.4.12 (#810)

* Update sbt-bloop to 1.4.12

* Update sbt-bloop to 1.4.12

* Update scala-library to 2.13.8 (#801)

* Update scala-library to 2.13.8

* Regenerate workflow with sbt-github-actions

* Add configuration builder methods to zhttp.service.Server (#768)

* Add configuration builder methods to zhttp.service.Server

* Update zio-http/src/main/scala/zhttp/service/Server.scala

Co-authored-by: Tushar Mathur <tusharmath@gmail.com>

* Update zio-http/src/main/scala/zhttp/service/Server.scala

Co-authored-by: Tushar Mathur <tusharmath@gmail.com>

* Update zio-http/src/main/scala/zhttp/service/Server.scala

Co-authored-by: Tushar Mathur <tusharmath@gmail.com>

* Change some server with* builder methods (enable parameter)

* Server withAcceptContinue(enabled)

Co-authored-by: Tushar Mathur <tusharmath@gmail.com>

* maintenance: html template for internal server error string (#851)

Closes #842

* Performance: Improve benchmarking code (#731)

* wip: try server codec without validation

* wip: remove flush consolidator

* wip: use wrapped buffer

* wip: add flush consolidator

* perf: make response encoding checks faster

* use encoder and decoder (#733)

* wip: remove Request creation

* use encoder and decoder

Co-authored-by: Tushar Mathur <tusharmath@gmail.com>

* disable object aggregator

* disable object aggregator

* revert disable object aggregator

* doc: update scala doc

* perf: freeze the HttpResponse

Co-authored-by: Amit Kumar Singh <amit.singh@dream11.com>
Co-authored-by: amitsingh <amitksingh1490@gmail.com>

* Refactor: Support middlewares on Http (#773)

* refactor: remove type-params from Response

* chore: self review

* refactor: rename Middleware to HttpMiddleware

* refactor: add `@@@` to Http as an alternative to `@@`.

* feature: add new Middleware API

* feature: add `flatten` and `ifThenElse`

* feature: add `ifThenElseZIO`

* refactor: fix type params for `identity`

* feature: add `when`

* feature: add `make` constructor

* refactor: make middleware methods final

* refactor: git remains

* refactor: implement HttpMiddleware as Middleware

* scala3 fix

* Refactor CORS middleware (#788)

* Refactor/merge middleware and http middleware (#790)

* Refactor move cors and timeout

* move some httpMiddlewares to Middleware

* move some AuthMiddleware to Middleware

* move remaining AuthMiddleware to Middleware

* move Middlewares to middleware package

* scaladoc

* codec example

* move Middleware to http package

* named alias for `@@`

* rename Auth to AuthMiddlewares

* rename CORSMiddleware to CorsMiddlewares

* rename CSRF to CsrfMiddlewares

* make primitives private

* rename MiddlewareExtensions to HttpMiddlewares

* rename operators in HttpMiddlewares

* scalaDoc

* arg rename

* doc update and general refactor

* simplify cors middleware

* rename CorsConfig

* renames

* Make middlewares package private MiddlewareRequest

* Introduce MiddlewareRequest (#798)

* Introduce MiddlewareRequest

* PR review comments

* Refactor move runAfter to Middleware

* refactor: add `UMiddleware`

* feature: add `contramapZIO`

* refactor: move cors config to Cors file

* refactor: rename files

* refactor: remove AuthSpec from WebSpec

* refactor: fix naming for Http operators

* refactor: add partial type suport for contraMapZIO

* Refactor: Codec (#841)

* Add Run Before (#840)

* Add Run Before

* Add Run Before and After

* use renamed operator

* refactor: add partial type suport for contraMap

* Implement missing operators in Middleware (#807)

* Implement missing operators in Middleware

* fix as operator

* headers Middleware changes

* sign cookie

* extend with HeaderExtensions

* rename suite

* PR comments

* refactor: use `Request` instead of `MiddlewareRequest`

* refactor: rename methods

* refactor: resolve fix me issue

Co-authored-by: amitsingh <amitksingh1490@gmail.com>
Co-authored-by: Amit Kumar Singh <amit.singh@dream11.com>

* ZIO 2 support (#809)

* upgrade to zio 2.0.0-RC1

* bump timeout for failing test

* other fixes

* increase timeout

* rejigger broken test

* try, try again

* get compiling & tests passing

Co-authored-by: Kit Langton <kit.langton@gmail.com>

* Delete commented websocket tests (#826)

* Backmerge main 14 jan 2021 (#831)

* Doc: Add outline (#815)

* doc: add categories

* refactor: doc structure refactored

* fix: package-lock.json removed

* refactor: create outline sub-directories

* refactor: rename test to testing

* Update netty-all to 4.1.73.Final (#811)

* Feature: API to modify headers (#824)

* feat(Headers):added new api to update headers

* renamed api

* Feature: Signed Cookie (#751)

* feat(cookie): added secret in cookie

* feat(cookie): added signcookie middleware

* feat(cookie): scalafmt

* fix(cookie): sign cookie while encoding

* scalafmt

* fix(Cookie): added unsign method for cookie

* fix(cookie): minor changes

* fix(signCookieMiddleware: simplified signCookies

* fix(cookie): removed try catch from signContent

* cookie: throw error in verify

* cookie: throw error in verify

* verify method changes

* fixed test cases

* fix: removed decodeResponseSignedCookie

* fix: middlewareSpec

* added modifyheaders in middleware

* removed unwanted changes

* scalafmt

* refactoring

* refactoring

* build fix

* build fix

* fix: decodeResponseCookie

* added modify

* Update sbt-scalafix to 0.9.34 (#805)

* Fix: Echo streaming (#828)

* Failing test

* Fix echo streaming

* Pr Comments

* ZIO 2 support (#809)

* upgrade to zio 2.0.0-RC1

* bump timeout for failing test

* other fixes

* increase timeout

* rejigger broken test

* try, try again

* get compiling & tests passing

Co-authored-by: Kit Langton <kit.langton@gmail.com>

* ZIO2 changes

* scalafmt

* renamed

Co-authored-by: Shubham Girdhar <girdharshubham@hotmail.com>
Co-authored-by: Shruti Verma <62893271+ShrutiVerma97@users.noreply.github.com>
Co-authored-by: John A. De Goes <john@degoes.net>
Co-authored-by: Kit Langton <kit.langton@gmail.com>

* Merge

Co-authored-by: Shubham Girdhar <girdharshubham@hotmail.com>
Co-authored-by: Shruti Verma <62893271+ShrutiVerma97@users.noreply.github.com>
Co-authored-by: Gabriel Ciuloaica <95849448+gciuloaica@users.noreply.github.com>
Co-authored-by: Tushar Mathur <tushar@dream11.com>
Co-authored-by: Amit Kumar Singh <amit.singh@dream11.com>
Co-authored-by: Javier Goday <jgoday@gmail.com>
Co-authored-by: Tushar Mathur <tusharmath@gmail.com>
Co-authored-by: amitsingh <amitksingh1490@gmail.com>
Co-authored-by: Kit Langton <kit.langton@gmail.com>
amitksingh1490 pushed a commit that referenced this pull request Feb 10, 2022
* Doc: Add outline (#815)

* doc: add categories

* refactor: doc structure refactored

* fix: package-lock.json removed

* refactor: create outline sub-directories

* refactor: rename test to testing

* Update netty-all to 4.1.73.Final (#811)

* Disable benchmarks comment on fork pull request (#820)

* Disable benchmarks on fork PR

* run benchmarks on fork PR but disbable PR comment

* Feature: API to modify headers (#824)

* feat(Headers):added new api to update headers

* renamed api

* Feature: Signed Cookie (#751)

* feat(cookie): added secret in cookie

* feat(cookie): added signcookie middleware

* feat(cookie): scalafmt

* fix(cookie): sign cookie while encoding

* scalafmt

* fix(Cookie): added unsign method for cookie

* fix(cookie): minor changes

* fix(signCookieMiddleware: simplified signCookies

* fix(cookie): removed try catch from signContent

* cookie: throw error in verify

* cookie: throw error in verify

* verify method changes

* fixed test cases

* fix: removed decodeResponseSignedCookie

* fix: middlewareSpec

* added modifyheaders in middleware

* removed unwanted changes

* scalafmt

* refactoring

* refactoring

* build fix

* build fix

* fix: decodeResponseCookie

* added modify

* Update sbt-scalafix to 0.9.34 (#805)

* Fix: Echo streaming (#828)

* Failing test

* Fix echo streaming

* Pr Comments

* Docs: Update Basic Examples (#814)

* doc(Getting started): updated examples

* docs: updated basic examples

* docs: update advanced examples (#816)

* maintenance: semanticdb revision usage (#832)

* maintenance: workflow scala version (#833)

* Fix: HasHeader bug (#835)

* #834 - fix and test for the bug.

* applied suggested change

* refactor: fix naming for Http operators (#839)

* Update sbt-bloop to 1.4.12 (#810)

* Update sbt-bloop to 1.4.12

* Update sbt-bloop to 1.4.12

* Update scala-library to 2.13.8 (#801)

* Update scala-library to 2.13.8

* Regenerate workflow with sbt-github-actions

* Add configuration builder methods to zhttp.service.Server (#768)

* Add configuration builder methods to zhttp.service.Server

* Update zio-http/src/main/scala/zhttp/service/Server.scala

Co-authored-by: Tushar Mathur <tusharmath@gmail.com>

* Update zio-http/src/main/scala/zhttp/service/Server.scala

Co-authored-by: Tushar Mathur <tusharmath@gmail.com>

* Update zio-http/src/main/scala/zhttp/service/Server.scala

Co-authored-by: Tushar Mathur <tusharmath@gmail.com>

* Change some server with* builder methods (enable parameter)

* Server withAcceptContinue(enabled)

Co-authored-by: Tushar Mathur <tusharmath@gmail.com>

* maintenance: html template for internal server error string (#851)

Closes #842

* Performance: Improve benchmarking code (#731)

* wip: try server codec without validation

* wip: remove flush consolidator

* wip: use wrapped buffer

* wip: add flush consolidator

* perf: make response encoding checks faster

* use encoder and decoder (#733)

* wip: remove Request creation

* use encoder and decoder

Co-authored-by: Tushar Mathur <tusharmath@gmail.com>

* disable object aggregator

* disable object aggregator

* revert disable object aggregator

* doc: update scala doc

* perf: freeze the HttpResponse

Co-authored-by: Amit Kumar Singh <amit.singh@dream11.com>
Co-authored-by: amitsingh <amitksingh1490@gmail.com>

* Refactor: Support middlewares on Http (#773)

* refactor: remove type-params from Response

* chore: self review

* refactor: rename Middleware to HttpMiddleware

* refactor: add `@@@` to Http as an alternative to `@@`.

* feature: add new Middleware API

* feature: add `flatten` and `ifThenElse`

* feature: add `ifThenElseZIO`

* refactor: fix type params for `identity`

* feature: add `when`

* feature: add `make` constructor

* refactor: make middleware methods final

* refactor: git remains

* refactor: implement HttpMiddleware as Middleware

* scala3 fix

* Refactor CORS middleware (#788)

* Refactor/merge middleware and http middleware (#790)

* Refactor move cors and timeout

* move some httpMiddlewares to Middleware

* move some AuthMiddleware to Middleware

* move remaining AuthMiddleware to Middleware

* move Middlewares to middleware package

* scaladoc

* codec example

* move Middleware to http package

* named alias for `@@`

* rename Auth to AuthMiddlewares

* rename CORSMiddleware to CorsMiddlewares

* rename CSRF to CsrfMiddlewares

* make primitives private

* rename MiddlewareExtensions to HttpMiddlewares

* rename operators in HttpMiddlewares

* scalaDoc

* arg rename

* doc update and general refactor

* simplify cors middleware

* rename CorsConfig

* renames

* Make middlewares package private MiddlewareRequest

* Introduce MiddlewareRequest (#798)

* Introduce MiddlewareRequest

* PR review comments

* Refactor move runAfter to Middleware

* refactor: add `UMiddleware`

* feature: add `contramapZIO`

* refactor: move cors config to Cors file

* refactor: rename files

* refactor: remove AuthSpec from WebSpec

* refactor: fix naming for Http operators

* refactor: add partial type suport for contraMapZIO

* Refactor: Codec (#841)

* Add Run Before (#840)

* Add Run Before

* Add Run Before and After

* use renamed operator

* refactor: add partial type suport for contraMap

* Implement missing operators in Middleware (#807)

* Implement missing operators in Middleware

* fix as operator

* headers Middleware changes

* sign cookie

* extend with HeaderExtensions

* rename suite

* PR comments

* refactor: use `Request` instead of `MiddlewareRequest`

* refactor: rename methods

* refactor: resolve fix me issue

Co-authored-by: amitsingh <amitksingh1490@gmail.com>
Co-authored-by: Amit Kumar Singh <amit.singh@dream11.com>

* refactor: rename ClientParams to ClientRequest (#856)

* refactor: use declarative encoding for http.middleware (#869)

* Move docs to v1.x directory (#861)

* Bug Add host in client from absolute URL (#847)

* feat(Client): Add host in client from absolute URL

* feat(Client): Refactor and add spec for host value

* feat(Client): fmt formatting

* feat(Client): fmt formatting

* feat(Client): use setHeaders from netty

* feat(Client): Add spec for host

* feat(Client): Add spec for host

* feat(Client): Rename clientParams to clientRequest

* Doc website fix (#871)

* Update scala3-library to 3.1.1 (#873)

* Update scala3-library to 3.1.1

* Regenerate workflow with sbt-github-actions

* Doc: Fix getting started link (#874)

* Update scalafmt-core to 3.3.2 (#864)

* Doc: `Headers` documentation (#817)

* doc: add categories

* refactor: doc structure refactored

* fix: package-lock.json removed

* refactor: create outline sub-directories

* initial draft on Headers documentaiton

* refactor: rename test to testing

* migrated Headers doc in the right structure

* re-organized the section. added more examples on the service, client and middleware side.

* updated documentation

* updated based on review

* more updates

* more updates

* minor changes

* minor changes

* Update docs/website/docs/v1.x/dsl/headers/index.md

* Update docs/website/docs/v1.x/dsl/headers/index.md

Co-authored-by: Shubham Girdhar <girdharshubham@hotmail.com>
Co-authored-by: amitsingh <amitksingh1490@gmail.com>
Co-authored-by: Amit Kumar Singh <amit.singh@dream11.com>

* Fix collapsible Headers Doc (#876)

* Test: Added Integration tests for `HExit.Success` (#852)

* feat: added validation app for HExit without zio

* feat: removed type from validationAppSpec

* test: Iterating using HttpGen.Method

* test: rearranged status method params

* test: name fixes

* Update scalafmt-core to 3.3.3 (#881)

* Update scalafmt-core to 3.3.3 (#884)

* Fix: EncodeClientParams (#868)

* fix: encodeClientParams

* test(client): added test for req url string

* test(client): variable name changed

* test: added test in encodeClientSpec

* simplifies test case

* doc: add comment on why relative path needs to be used.

Co-authored-by: Tushar Mathur <tusharmath@gmail.com>

* Refactor: HttpRunnableSpec clean up (#857)

* refactor: reduce HttpRunnableSpec boilerplate

* refactor: remove all helpers from HttpRunnableSpec and inline the method

* doc: update documentation for test module

* refactor: add type-constraints to Http for specialized methods

* refactor: use IsResponse type constraint

* style(*): apply scala fmt

* doc: update documentation

* update doc (#897)

* Docs: Getting started (#887)

* fix: added more content

* fixed comments

* fix: getting started

* modifications

* added more

* minor changes

* minor changes

* changes

* refactor: rename asString to encode in URI (#898)

* refactor: rename asString to encode in Scheme (#904)

* fix: example links (#906)

* Update getting-started.md (#907)

* refactor: rename asString to encode in Scheme (#905)

* Doc: setup (#886)

* doc: setup

* resolve: PR comments

* Update netty-incubator-transport-native-io_uring to 0.0.12.Final (#908)

* Documentation for Server (#885)

* removed config.md and make configurations part of Server page

* added server configurations

* markdwon appearing fine in docusaurus generated page

* added one missing configuration

* Server documentation changed according to PR comments

* change note to tip

Co-authored-by: Sumant Awasthi <sumant.awasthi@D11-Sumant.Awasthi>
Co-authored-by: amitsingh <amitksingh1490@gmail.com>

* Performance: Improve performance of `collectM` (#882)

* Use ZIO response

* fix: improve cancellation performance

* refactor: use sticky server

* refactor: reduce allocations

* revert example

* Doc: Added <> operator in getting started (#910)

* fix: ++ operator doc

* fix: composition

* feature: Add `collectManaged` to Http (#909)

* Add collectManaged

* comment typo

* feature: add `echo` operator to `Socket` (#900)

* feature: add `Socket.empty` (#901)

* feature: add `Socket.empty`

* test: add unit test case for Socket#empty

Co-authored-by: Shubham Girdhar <girdharshubham@hotmail.com>

* feature: add `toHttp` to Socket.scala (#902)

* feature: add `toHttp` to Socket.scala

* test: add unit test for `toApp` to Socket.scala

Co-authored-by: Shubham Girdhar <girdharshubham@hotmail.com>

* refactor: merge Request for Client and Server (#894)

* Revert "refactor: merge Request for Client and Server (#894)" (#915)

This reverts commit fc8b9b5.

* Feature: add `toHttp` to Response (#903)

* feature: add `wrapHttp` to Response

* test: add unit test for wrapHttp in Response.scala

* refactor: operator name changed to `toHttp`

Co-authored-by: Shubham Girdhar <girdharshubham@hotmail.com>

* Update scalafmt-core to 3.4.0 (#920)

* Update sbt to 1.6.2 (#931)

* Remove outdated benchmark.md (#940)

* removed benchmark file

* removed benchmark hyperlink from readme

* refactor: rename `getHeaders` to `headers` in `ClientRequest` (#928)

* refactor: rename `getHeaders` to `headers` in `ClientRequest`

* fix: compiler errors

* fix: compiler errors

* Refactor: rename `asString` to `encode` in `Path` (#927)

* refactor: rename `asString` to `encode` in Path

* fix: compiler errors

* Disable flow Control (#854)

* Add builder pattern for URL (#930)

* Add builder pattern for URL

* Compare encoded value to string literal

* Documentation: Http (#888)

* initial commit for http documentation

* refactor: adding bold formatting for HTTP and resolving review comments

* refactor: Chnage app to application in http documentation

* refactor:fixed review comments

* added combinators section

* style: formatting the code blocks

* added getBodyAsString to http documentation

* added HttpApp section

* fixing typos

* added mapZIO and contamapZIO documentation for http

* provide layer documentation for http

* doc: added a secion- Running an HttpApp

Co-authored-by: Dino John <dinojohn@D11-Dino.John>

* feature: add `Http.apply` (#949)

* Refactor: Drop `toZIO` and `wrapZIO` APIs  (#950)

* feature: add `Http.apply`

* refactor: remove ZIO wrapping APIs

* Fix: Server KeepAlive true by default and enable client to set Http version on requests (#792)

* IT cases for KeepAlive included in ServerConfigSpec

* Allow possibility of modifying server conf in HttpRunnableSpec

* reverted Header.scala

* reverted Header.scala

* reverted Header.scala

* struggling with fmt

* pull latest from main

* reverting changes in ci files

* included review recommendations

* Concise test description

* removed extra comments

* readjusted ServerConfigSpec

* enable keep alive by default; added more test cases for Http 1.0; tweaked test cases and description

* removed configurableServe

* removed unnecessary lines; shorter tests

* reverted Server disabled and some spec changes

* Test/keepalive httpversion (#800)

* make httpVersion first param in request methods

* tweaked test cases even further using requestHeaderValueByName

* changed names

* resolved comments, and more tweaking of test

* deleted extra line

Co-authored-by: Sumant Awasthi <sumant.awasthi@D11-Sumant.Awasthi>

* Renamed ServerConfigSpec to KeepAliveSpec

* made httpVersion first param in ClientParams, made relevant changes

* in EncodeClientParams use http version from ClientParams

* a minor change

* changed server keepAlive = true by default, also rebased with main

Co-authored-by: Sumant Awasthi <sumant.awasthi@D11-Sumant.Awasthi>

* feat: url add `isAbsolute` and `isRelative` operators (#946)

* refactor: add type-params

* feat: url add `isAbsolute` and `isRelative` operators

# Conflicts:
#	zio-http/src/main/scala/zhttp/http/URL.scala

* WebSocket Client Support (#933)

* wip: websocket client support

* test: add unit test for WebSocket using native websocket client

* fix: fromZIO in websocket client spec

* refactor: queue usage simplified

* feat: websocket client support

* refactor: imports optimized

* doc: for ClientSocketHandler

* refactor: bootstrap method

* websocket client with response support

* feat: wss support

* refactor: SocketProtocol

* refactor: add SocketClient
example: add WebSocketSimpleClient

* refactor: SocketProtocol with type evidence
refactor: general clean up

* test: for Scheme

* refactor: rename asString to encode in URI

* refactor: remove example of SecureClient

* refactor: url doesn't need to be part of the protocol. Url can be passed as an additional parameter for now. This simplifies the overall design.

* refactor: socket client for now will take the complete url

* refactor: update client example

* refactor: add `connect` operator to SocketApp

* refactor: use `url` as a string instead of URL type

* refactor: re-order methods

* style(*): apply scala fmt

* revert: unnecessary changes

* feature: add `echo` operator to `Socket`

* refactor: update type info

* feature: add `Socket.empty`

* feature: add `wrapHttp` to Response

* feature: add `toHttp` to Socket.scala

* style(*): apply scala fmt

* refactor: rename asString to encode in Scheme

* refactor: cleanup Scheme changes

* test: update test assertion

* refactor: combine server and client handlers

* refactor: add hint in touch for ClientSocketUpgradeHandler

* refactor: change package for SocketAppHandler

* refactor: rename methods  in SocketProtocol

* fix: add host header and port in Request automatically

* fix: example links (#906)

* Update getting-started.md (#907)

* refactor: rename asString to encode in Scheme (#905)

* Doc: setup (#886)

* doc: setup

* resolve: PR comments

* Update netty-incubator-transport-native-io_uring to 0.0.12.Final (#908)

* Documentation for Server (#885)

* removed config.md and make configurations part of Server page

* added server configurations

* markdwon appearing fine in docusaurus generated page

* added one missing configuration

* Server documentation changed according to PR comments

* change note to tip

Co-authored-by: Sumant Awasthi <sumant.awasthi@D11-Sumant.Awasthi>
Co-authored-by: amitsingh <amitksingh1490@gmail.com>

* Performance: Improve performance of `collectM` (#882)

* Use ZIO response

* fix: improve cancellation performance

* refactor: use sticky server

* refactor: reduce allocations

* revert example

* Doc: Added <> operator in getting started (#910)

* fix: ++ operator doc

* fix: composition

* feature: Add `collectManaged` to Http (#909)

* Add collectManaged

* comment typo

* feature: add `echo` operator to `Socket` (#900)

* feature: add `Socket.empty` (#901)

* feature: add `Socket.empty`

* test: add unit test case for Socket#empty

Co-authored-by: Shubham Girdhar <girdharshubham@hotmail.com>

* refactor: add attribute to Request created by Handler

* refactor: remove "case" from ClientInboundHandler

* refactor: rename to WebSocketAppHandler

* feature: add `toHttp` to Socket.scala (#902)

* feature: add `toHttp` to Socket.scala

* test: add unit test for `toApp` to Socket.scala

Co-authored-by: Shubham Girdhar <girdharshubham@hotmail.com>

* cleaning up residue files

* refactor: rename `asString` to `encode` in Path

* refactor: rename `getHeaders` to `headers` in `ClientRequest`

* refactor: simplify client API

* refactor: update client params encoder

* style: ordering methods in URL.scala

* refactor: ClientRequest will throw if the url is invalid

* refactor: pass URL instead of String in ClientRequest

* test: fix `GetBodyAsStringSpec`

* style(*): apply scala fmt

* refactor: fix invalid url being passed in HttpRunnableSpec

* refactor: Move SSL requirements to ClientAttirbute

* feature: add `scheme` operator on URL

* feature: add `IsWebSocket` and `isSecure` operators on Scheme

* refactor: use named imports in WebSocketAppHandler

* test: fix base url for websockets

* refactor: update how flags are set inside client

* test: add non-zio spec to the spec list

* refactor: fix client test

* style: scalafmt error and remove TODO

* refactor: remove unused handler

* refactor: remove host header changes and RequestSpec (#945)

* refactor: move java scheme generators to SchemeSpec (#944)

* refactor: move java scheme generators to SchemeSpec

* refactor: resolve PR comments

* feat: url add `isAbsolute` and `isRelative` operators

* refactor: rename EncodeClientParams.scala to EncodeClientRequest

* fix: handle errors on client connection

* style(*): apply scala fmt

* refactor: simplify multiple websocket upgrades test (#948)

* refactor: resolve PR comments
style: fmt fix

* refactor: general refactor and style changes

Co-authored-by: Shubham Girdhar <girdharshubham@hotmail.com>
Co-authored-by: Shruti Verma <62893271+ShrutiVerma97@users.noreply.github.com>
Co-authored-by: Amit Kumar Singh <amit.singh@dream11.com>
Co-authored-by: Scala Steward <43047562+scala-steward@users.noreply.github.com>
Co-authored-by: sumawa <awasthi.sumant@gmail.com>
Co-authored-by: Sumant Awasthi <sumant.awasthi@D11-Sumant.Awasthi>
Co-authored-by: amitsingh <amitksingh1490@gmail.com>
Co-authored-by: James Beem <beem132@gmail.com>

* Documentation: Request (#926)

* docs: request

* doc: added client request docs

* added query param section

* doc: refactoring

* WIP

* fix: doc

* fix: doc

* request

* request

* example fixed

* Fix ssl issue due to missing peer host port hint (#952)

* feature: add connect operator on Socket (#955)

* Style: Update scala doc wrapping (#959)

* chore: update scalafmt config

* style(*): apply scala fmt

* remove get prefix (#958)

* Update scalafmt-core to 3.4.1 (#960)

* Update scalafmt-core to 3.4.2 (#962)

* Update scalafmt-core to 3.4.2 (#961)

* remove declarative API (#957)

* Update sbt-updates to 0.6.2 (#966)

* Doc: Readme (#970)

* fix: readme

* changed note

* style: rearrange methods in files (#963)

* Doc: Cookie (#974)

* doc: cookie

* doc: cookie

* cookie: changes

* refactor: drop `CanBeSilent` type-constraint from Http (#964)

* refactor: drop `CanBeSilent` type-constraint from Http

* update usage of `silent` operator

* Feature: add `Version` (#965)

* refactor: rename `asHttpMethod` to `toJava`

* refactor: add `Version` domain

* style(*): apply scala fmt

* Fix: Fire response instead of error in HExit.Failure() (#980)

* Bug fix: fixes #979

* Made changes to nonZIOSpec in ServerSpec to include tests for HExit.Failure()

* fix: typo in bug_report.md (#981)

* Update netty-all to 4.1.74.Final (#982)

* refactor: remove sealed modifier from Middleware trait (#984)

* refactor: rename method on Client (#985)

* ZIO 2 support (#809)

* upgrade to zio 2.0.0-RC1

* bump timeout for failing test

* other fixes

* increase timeout

* rejigger broken test

* try, try again

* get compiling & tests passing

Co-authored-by: Kit Langton <kit.langton@gmail.com>

* Backmerge main 14 jan 2021 (#831)

* Doc: Add outline (#815)

* doc: add categories

* refactor: doc structure refactored

* fix: package-lock.json removed

* refactor: create outline sub-directories

* refactor: rename test to testing

* Update netty-all to 4.1.73.Final (#811)

* Feature: API to modify headers (#824)

* feat(Headers):added new api to update headers

* renamed api

* Feature: Signed Cookie (#751)

* feat(cookie): added secret in cookie

* feat(cookie): added signcookie middleware

* feat(cookie): scalafmt

* fix(cookie): sign cookie while encoding

* scalafmt

* fix(Cookie): added unsign method for cookie

* fix(cookie): minor changes

* fix(signCookieMiddleware: simplified signCookies

* fix(cookie): removed try catch from signContent

* cookie: throw error in verify

* cookie: throw error in verify

* verify method changes

* fixed test cases

* fix: removed decodeResponseSignedCookie

* fix: middlewareSpec

* added modifyheaders in middleware

* removed unwanted changes

* scalafmt

* refactoring

* refactoring

* build fix

* build fix

* fix: decodeResponseCookie

* added modify

* Update sbt-scalafix to 0.9.34 (#805)

* Fix: Echo streaming (#828)

* Failing test

* Fix echo streaming

* Pr Comments

* ZIO 2 support (#809)

* upgrade to zio 2.0.0-RC1

* bump timeout for failing test

* other fixes

* increase timeout

* rejigger broken test

* try, try again

* get compiling & tests passing

Co-authored-by: Kit Langton <kit.langton@gmail.com>

* ZIO2 changes

* scalafmt

* renamed

Co-authored-by: Shubham Girdhar <girdharshubham@hotmail.com>
Co-authored-by: Shruti Verma <62893271+ShrutiVerma97@users.noreply.github.com>
Co-authored-by: John A. De Goes <john@degoes.net>
Co-authored-by: Kit Langton <kit.langton@gmail.com>

* Enable snapshot versioning for ZIO-2/series (#844)

* ZIO 2: Latest changes from main (#858)

* Doc: Add outline (#815)

* doc: add categories

* refactor: doc structure refactored

* fix: package-lock.json removed

* refactor: create outline sub-directories

* refactor: rename test to testing

* Docs: Update Basic Examples (#814)

* doc(Getting started): updated examples

* docs: updated basic examples

* docs: update advanced examples (#816)

* maintenance: semanticdb revision usage (#832)

* maintenance: workflow scala version (#833)

* Fix: HasHeader bug (#835)

* #834 - fix and test for the bug.

* applied suggested change

* refactor: fix naming for Http operators (#839)

* Update sbt-bloop to 1.4.12 (#810)

* Update sbt-bloop to 1.4.12

* Update sbt-bloop to 1.4.12

* Update scala-library to 2.13.8 (#801)

* Update scala-library to 2.13.8

* Regenerate workflow with sbt-github-actions

* Add configuration builder methods to zhttp.service.Server (#768)

* Add configuration builder methods to zhttp.service.Server

* Update zio-http/src/main/scala/zhttp/service/Server.scala

Co-authored-by: Tushar Mathur <tusharmath@gmail.com>

* Update zio-http/src/main/scala/zhttp/service/Server.scala

Co-authored-by: Tushar Mathur <tusharmath@gmail.com>

* Update zio-http/src/main/scala/zhttp/service/Server.scala

Co-authored-by: Tushar Mathur <tusharmath@gmail.com>

* Change some server with* builder methods (enable parameter)

* Server withAcceptContinue(enabled)

Co-authored-by: Tushar Mathur <tusharmath@gmail.com>

* maintenance: html template for internal server error string (#851)

Closes #842

* Performance: Improve benchmarking code (#731)

* wip: try server codec without validation

* wip: remove flush consolidator

* wip: use wrapped buffer

* wip: add flush consolidator

* perf: make response encoding checks faster

* use encoder and decoder (#733)

* wip: remove Request creation

* use encoder and decoder

Co-authored-by: Tushar Mathur <tusharmath@gmail.com>

* disable object aggregator

* disable object aggregator

* revert disable object aggregator

* doc: update scala doc

* perf: freeze the HttpResponse

Co-authored-by: Amit Kumar Singh <amit.singh@dream11.com>
Co-authored-by: amitsingh <amitksingh1490@gmail.com>

* Refactor: Support middlewares on Http (#773)

* refactor: remove type-params from Response

* chore: self review

* refactor: rename Middleware to HttpMiddleware

* refactor: add `@@@` to Http as an alternative to `@@`.

* feature: add new Middleware API

* feature: add `flatten` and `ifThenElse`

* feature: add `ifThenElseZIO`

* refactor: fix type params for `identity`

* feature: add `when`

* feature: add `make` constructor

* refactor: make middleware methods final

* refactor: git remains

* refactor: implement HttpMiddleware as Middleware

* scala3 fix

* Refactor CORS middleware (#788)

* Refactor/merge middleware and http middleware (#790)

* Refactor move cors and timeout

* move some httpMiddlewares to Middleware

* move some AuthMiddleware to Middleware

* move remaining AuthMiddleware to Middleware

* move Middlewares to middleware package

* scaladoc

* codec example

* move Middleware to http package

* named alias for `@@`

* rename Auth to AuthMiddlewares

* rename CORSMiddleware to CorsMiddlewares

* rename CSRF to CsrfMiddlewares

* make primitives private

* rename MiddlewareExtensions to HttpMiddlewares

* rename operators in HttpMiddlewares

* scalaDoc

* arg rename

* doc update and general refactor

* simplify cors middleware

* rename CorsConfig

* renames

* Make middlewares package private MiddlewareRequest

* Introduce MiddlewareRequest (#798)

* Introduce MiddlewareRequest

* PR review comments

* Refactor move runAfter to Middleware

* refactor: add `UMiddleware`

* feature: add `contramapZIO`

* refactor: move cors config to Cors file

* refactor: rename files

* refactor: remove AuthSpec from WebSpec

* refactor: fix naming for Http operators

* refactor: add partial type suport for contraMapZIO

* Refactor: Codec (#841)

* Add Run Before (#840)

* Add Run Before

* Add Run Before and After

* use renamed operator

* refactor: add partial type suport for contraMap

* Implement missing operators in Middleware (#807)

* Implement missing operators in Middleware

* fix as operator

* headers Middleware changes

* sign cookie

* extend with HeaderExtensions

* rename suite

* PR comments

* refactor: use `Request` instead of `MiddlewareRequest`

* refactor: rename methods

* refactor: resolve fix me issue

Co-authored-by: amitsingh <amitksingh1490@gmail.com>
Co-authored-by: Amit Kumar Singh <amit.singh@dream11.com>

* ZIO 2 support (#809)

* upgrade to zio 2.0.0-RC1

* bump timeout for failing test

* other fixes

* increase timeout

* rejigger broken test

* try, try again

* get compiling & tests passing

Co-authored-by: Kit Langton <kit.langton@gmail.com>

* Delete commented websocket tests (#826)

* Backmerge main 14 jan 2021 (#831)

* Doc: Add outline (#815)

* doc: add categories

* refactor: doc structure refactored

* fix: package-lock.json removed

* refactor: create outline sub-directories

* refactor: rename test to testing

* Update netty-all to 4.1.73.Final (#811)

* Feature: API to modify headers (#824)

* feat(Headers):added new api to update headers

* renamed api

* Feature: Signed Cookie (#751)

* feat(cookie): added secret in cookie

* feat(cookie): added signcookie middleware

* feat(cookie): scalafmt

* fix(cookie): sign cookie while encoding

* scalafmt

* fix(Cookie): added unsign method for cookie

* fix(cookie): minor changes

* fix(signCookieMiddleware: simplified signCookies

* fix(cookie): removed try catch from signContent

* cookie: throw error in verify

* cookie: throw error in verify

* verify method changes

* fixed test cases

* fix: removed decodeResponseSignedCookie

* fix: middlewareSpec

* added modifyheaders in middleware

* removed unwanted changes

* scalafmt

* refactoring

* refactoring

* build fix

* build fix

* fix: decodeResponseCookie

* added modify

* Update sbt-scalafix to 0.9.34 (#805)

* Fix: Echo streaming (#828)

* Failing test

* Fix echo streaming

* Pr Comments

* ZIO 2 support (#809)

* upgrade to zio 2.0.0-RC1

* bump timeout for failing test

* other fixes

* increase timeout

* rejigger broken test

* try, try again

* get compiling & tests passing

Co-authored-by: Kit Langton <kit.langton@gmail.com>

* ZIO2 changes

* scalafmt

* renamed

Co-authored-by: Shubham Girdhar <girdharshubham@hotmail.com>
Co-authored-by: Shruti Verma <62893271+ShrutiVerma97@users.noreply.github.com>
Co-authored-by: John A. De Goes <john@degoes.net>
Co-authored-by: Kit Langton <kit.langton@gmail.com>

* Merge

Co-authored-by: Shubham Girdhar <girdharshubham@hotmail.com>
Co-authored-by: Shruti Verma <62893271+ShrutiVerma97@users.noreply.github.com>
Co-authored-by: Gabriel Ciuloaica <95849448+gciuloaica@users.noreply.github.com>
Co-authored-by: Tushar Mathur <tushar@dream11.com>
Co-authored-by: Amit Kumar Singh <amit.singh@dream11.com>
Co-authored-by: Javier Goday <jgoday@gmail.com>
Co-authored-by: Tushar Mathur <tusharmath@gmail.com>
Co-authored-by: amitsingh <amitksingh1490@gmail.com>
Co-authored-by: Kit Langton <kit.langton@gmail.com>

* upgrade zio version (#942)

* zio2 support

* use default runtime strategy

* use unsafeRunUninterruptible in client

* use sticky on Server

Co-authored-by: Shubham Girdhar <girdharshubham@hotmail.com>
Co-authored-by: Shruti Verma <62893271+ShrutiVerma97@users.noreply.github.com>
Co-authored-by: Gabriel Ciuloaica <95849448+gciuloaica@users.noreply.github.com>
Co-authored-by: Tushar Mathur <tushar@dream11.com>
Co-authored-by: Javier Goday <jgoday@gmail.com>
Co-authored-by: Tushar Mathur <tusharmath@gmail.com>
Co-authored-by: Brendan McKee <brendan.mckee@outlook.com>
Co-authored-by: kaushik143 <kaushik@dream11.com>
Co-authored-by: zsfVishnu-d11 <66246684+zsfVishnu-d11@users.noreply.github.com>
Co-authored-by: Scala Steward <43047562+scala-steward@users.noreply.github.com>
Co-authored-by: sumawa <awasthi.sumant@gmail.com>
Co-authored-by: Sumant Awasthi <sumant.awasthi@D11-Sumant.Awasthi>
Co-authored-by: James Beem <beem132@gmail.com>
Co-authored-by: Dino Babu John <66246799+dinojohn@users.noreply.github.com>
Co-authored-by: Dino John <dinojohn@D11-Dino.John>
Co-authored-by: John A. De Goes <john@degoes.net>
Co-authored-by: Kit Langton <kit.langton@gmail.com>
Co-authored-by: Adam Fraser <adam.fraser@gmail.com>
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.

None yet

5 participants