Skip to content

Commit

Permalink
do not freeze.
Browse files Browse the repository at this point in the history
  • Loading branch information
khajavi committed May 8, 2024
1 parent b401bef commit 417c5a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ object PlainTextBenchmarkServer extends ZIOAppDefault {

private val STATIC_SERVER_NAME = "zio-http"

private val frozenJsonResponse = Response
private def frozenJsonResponse = Response
.json(jsonMessage)
// .serverTime
.addHeader(Header.Server(STATIC_SERVER_NAME))
Expand All @@ -35,7 +35,7 @@ object PlainTextBenchmarkServer extends ZIOAppDefault {
private def jsonApp(json: Response): Routes[Any, Response] =
Routes(Method.GET / jsonPath -> Handler.fromResponse(json))

val app: Routes[Any, Response] = plainTextApp(frozenPlainTextResponse) ++ jsonApp(frozenJsonResponse)
val app: Routes[Any, Response] = plainTextApp(frozenPlainTextResponse) ++ Routes(Method.GET / jsonPath -> Handler.fromResponse(frozenJsonResponse))// ++ jsonApp(frozenJsonResponse)

private val config = Server.Config.default
.port(8080)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ private[zio] final case class ServerInboundHandler(

}


// TODO: reimplement it on server settings level
// private def setServerTime(time: ServerTime, response: Response, jResponse: HttpResponse): Unit = {
// val _ =
Expand Down

0 comments on commit 417c5a6

Please sign in to comment.