Last active
June 24, 2022 05:00
-
-
Save rossabaker/3d696ad20ece5e4838add46159472a38 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// httpApp and dispatcher are required | |
// asyncTimeout and chunkSize have defaults | |
// Builder[F[_]] with constructor args | |
AsyncHttp4sServlet | |
.builder[IO](httpApp, dispatcher) | |
.withAsyncTimeout(5.seconds) | |
.withChunkSize(4096) | |
.build | |
// Builder[F[_], State] | |
// No special syntax for required params | |
// State is a "phantom type" | |
// Implicit =:= on build to check required args were set | |
AsyncHttp4sServlet | |
.builder[IO] | |
.withHttpApp(httpApp) | |
.withDispatcher(dispatcher) | |
.withAsyncTimeout(5.seconds) | |
.withChunkSize(4096) | |
.build |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment