http4s Questions

2

Solved

I want to log all the requests my application makes. The application makes several call like this: val client: Client = org.http4s.client.blaze.SimpleHttp1Client(...) client.fetch(Request(method =...
Wastepaper asked 4/4, 2018 at 11:7

1

I'm learning the concept of F[_] as a constructor for other types, but how do you pronounce this to another human or say it in your head (for us internal monologue thinkers). Similar to how x =>...
Monastic asked 24/12, 2021 at 1:42

3

Solved

So I'm no swagger expert, but all systems using swagger require you to have the swagger specification in JSON or YAML defining all endpoints (and such) of your API. My question is: Are there know ...
Papa asked 21/9, 2017 at 11:41

2

Solved

I trying to create blaze client with limited number of threads like this: object ReactiveCats extends IOApp { private val PORT = 8083 private val DELAY_SERVICE_URL = "http://localhost:8080&q...
Maemaeander asked 30/6, 2020 at 11:10

2

Solved

Whenever I hit unknown route in my http4s application it returns 404 error page with Content-Type: text/plain and body: Not found How can I force it to always return body as JSON with Content...
Exhilarate asked 29/12, 2019 at 10:33

1

I'm using http4s BlazeServer 0.21, how can I graceful shutdown? I want to reject all upcoming requests, and keep process unfinished requests and response back, within a hard shutdown time. I tried...
Virgel asked 16/3, 2020 at 7:12

0

The idea is to be able to unit test websocket endpoints on a router service. Any other kind of endpoint is fairly easy to test with a Request, but I can't figure out a way of easily testing websock...
Pontiff asked 18/3, 2020 at 11:35

3

Solved

I'm trying to define HttpService that receives json and parses it to case class with json4s library: import org.http4s._ import org.http4s.dsl._ import org.json4s._ import org.json4s.native.JsonMe...
Hyperform asked 4/5, 2016 at 20:19

2

Solved

I have created two Http4s routes: class FirstRoutes[F[_] : Async](service: FirstService[F]) extends Http4sDsl[F] { def routes: HttpRoutes[F] = HttpRoutes.of[F] { //... some code } } class Se...
Recife asked 25/4, 2019 at 21:7

2

Solved

Not so long time ago I switched from akka-http to http4s. One of the basic things which I wanted to do correctly — JSON handling, in particular sending a JSON response. I decided to use http4s wit...
Christcrossrow asked 23/5, 2019 at 10:22

2

Solved

This tut shows how to create an http4s Request: https://http4s.org/v0.18/dsl/#testing-the-service I would like to change this request to a POST method and add a literal json body using circe. I tr...
Mosier asked 9/4, 2018 at 5:36

1

Solved

I have a http4s project which uses ciris for configuration management. The project is in github here. libraryDependencies ++= Seq( "is.cir" %% "ciris-cats", "is.cir" %% "ciris-cats-effect", "i...
Deragon asked 7/1, 2019 at 1:57

1

Solved

Extending StreamApp asks you to provide the stream def. It has a requestShutdown parameter. def stream(args: List[String], requestShutdown: F[Unit]): Stream[F, ExitCode] I provide the implementa...
Ioves asked 6/3, 2018 at 21:59

1

I have a request that is talking to a backend db that takes time to respond. And the http4s is throwing request timeout. I wanted to know if there is a property to increase the request timeout? Th...
Severance asked 18/5, 2017 at 23:40

1

Solved

I am trying to use http4s, circe and http4s-circe. Below I am trying to use the auto derivation feature of circe. import org.http4s.client.blaze.SimpleHttp1Client import org.http4s.Status.Respon...
Fluellen asked 27/1, 2017 at 1:12
1

© 2022 - 2024 — McMap. All rights reserved.