Skip to content
This repository was archived by the owner on Mar 24, 2026. It is now read-only.

Finch 0.10.0#1933

Merged
ssmith-techempower merged 4 commits intoTechEmpower:masterfrom
mfirry:master
Mar 8, 2016
Merged

Finch 0.10.0#1933
ssmith-techempower merged 4 commits intoTechEmpower:masterfrom
mfirry:master

Conversation

@mfirry
Copy link
Copy Markdown
Contributor

@mfirry mfirry commented Feb 20, 2016

finch bumped to 0.10.0.

object WebServer extends App {

import io.finch.circe._
val json = get("json") {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we put type here Endpoint[io.circe.Json] and return Json.obj("message" -> Json.string("Hello, World!")) directly?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider it done.

@vkostyukov
Copy link
Copy Markdown
Contributor

Thanks @mfirry for taking care of this!

@mfirry
Copy link
Copy Markdown
Contributor Author

mfirry commented Feb 25, 2016

Ideally one should disable gzip and add Server and Date headers.

@vkostyukov
Copy link
Copy Markdown
Contributor

You can disable compression by Http.server.withCompressionLevel(0). I should probably do the same for a Finagle PR I opened #1941. Also you can use that as an inspiration for Date and Server codecs.

@vkostyukov
Copy link
Copy Markdown
Contributor

👍 Thanks @mfirry! Looks great!

Await.ready(
Httpx.serve(":9000", api)
Await.ready(Http.server
.withCompressionLevel(0)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry to bother again, but can you also disable stats receiver and tracer on a server instance? (in a same way as per #1941).

.withStatsReceiver(NullStatsReceiver)
.withTracer(NullTracer)

@ssmith-techempower
Copy link
Copy Markdown
Contributor

Looks good to me, merging in.

ssmith-techempower added a commit that referenced this pull request Mar 8, 2016
@ssmith-techempower ssmith-techempower merged commit 5dec4a9 into TechEmpower:master Mar 8, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants