Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 15:56

    github-actions[bot] on gh-pages

    deploy: fb8302b35246aa774b49707… (compare)

  • 15:50

    armanbilge on 0.23

    Call Chunk.toByteBuffer directly Merge pull request #6716 from C… (compare)

  • 15:50
    armanbilge closed #6716
  • 15:50
    armanbilge commented #6716
  • 15:39
    armanbilge commented #6732
  • 15:00

    danicheg on series

    (compare)

  • 14:48
    rossabaker closed #750
  • 14:29

    armanbilge on flake-lock-19

    (compare)

  • 14:09
    grouzen edited #6732
  • 13:39

    danicheg on sbt-giter8-0.16.0

    (compare)

  • 13:39

    danicheg on 0.23

    Update sbt-giter8 to 0.16.0 Merge pull request #291 from ht… (compare)

  • 13:39
    danicheg closed #291
  • 13:01
    http4s-steward[bot] opened #291
  • 13:01

    http4s-steward[bot] on sbt-giter8-0.16.0

    Update sbt-giter8 to 0.16.0 (compare)

  • 13:00
    http4s-steward[bot] synchronize #750
  • 13:00

    http4s-steward[bot] on series

    Update sbt-http4s-org to 0.14.6… Filter binary checking issue ou… Merge pull request #749 from ht… and 9 more (compare)

  • 12:12

    github-actions[bot] on gh-pages

    deploy: 5e00a3062f9fed0f04ab7e6… (compare)

  • 12:06

    rossabaker on 0.23

    flake.lock: Update Flake lock … Merge pull request #6731 from h… (compare)

  • 12:06
    rossabaker closed #6731
  • 11:52
    grouzen edited #6732
Boris V.Kuznetsov
@tampler

Hi I'm working with 0.21.0-SNAPSHOT and permanently getting a JSON parse error for a simple JSON parsing example. Here's my code:

    it("work with json") {

    val body = json"""
      {
        "id"        : 33        ,
        "url"       :"/testUrl" ,
        "title"     :"One"      ,
        "completed" : false     ,
        "order"     : "None"
      }"""
    val req = request[TodoTask](Method.POST, "/").withEntity(body)
...
}

And this gives me an error:

Fiber failed.
A checked error was not handled.
org.http4s.MalformedMessageBodyFailure: Malformed message body: Invalid JSON
        at org.http4s.circe.CirceInstances$.$anonfun$defaultCirceParseError$1(CirceInstances.scala:179)
        at cats.syntax.EitherOps$.leftMap$extension(either.scala:144)
        at org.http4s.circe.CirceInstances.$anonfun$jsonDecoderByteBufferImpl$1(CirceInstances.scala:37)
        at scala.util.Either.flatMap(Either.scala:341)

Any ideas ?

Circe 0.11.1, ZIO 1.0-RC5
Seth Lasky
@TheMover

For sending many requests with the blaze client is it better to do something like

BlazeClientBuilder[IO](global).resource.use{ client =>    
    val a = client.expect(...)
    val b = client.expect(...)
    val c = client.expect(...)
    ...
  }

or

val client = BlazeClientBuilder[IO](global).resource
val a = client.use(_.expect(...))
val b = client.use(_.expect(...))
val c = client.use(_.expect(...))
  ...
Michael Pilquist
@mpilquist
@TheMover Former, as the latter will create connection pools multiple times and then free them multiple times
Seth Lasky
@TheMover
That's what I thought, just wanted to make sure - thank you!
Rob Norris
@tpolecat
I am trying to add some request headers. Does POST(json, uri).map(_.withHeaders(myHeaders)) look right?
Christopher Davenport
@ChristopherDavenport
That should do it.
Rob Norris
@tpolecat
I'm getting a 400 back from the remote server after doing that and I can't figure out why.
Ok
Christopher Davenport
@ChristopherDavenport
You may want to include the original headers.
Rob Norris
@tpolecat
How do I do that?
Christopher Davenport
@ChristopherDavenport
POST(json, uri).map(req => req.withHeaders(req.headers |+| myHeaders)) if you are on the newer stuff
_.putHeaders does what you want though, assoming you are ok with the eta expansion.
Rob Norris
@tpolecat
That fixed it, thanks.
Rob Norris
@tpolecat
Man, this ConcurrentEffect thing is really bringing me down.
Michael Pilquist
@mpilquist
lol
Rob Norris
@tpolecat
Do you think we could replace this with imperative code that just uses reactive streams instead of hopping into fs2?
Well I guess the response needs a stream doesn't it.
bah
I'll see if the ember client works.
Forked!
Rob Norris
@tpolecat
Aaaaaaaaand it works!
Gavin Bisesi
@Daenyth
:parrots:
Billzabob
@Billzabob
I’m really sad that emote doesn’t work in Gitter :(
Gavin Bisesi
@Daenyth
indeed
Christopher Davenport
@ChristopherDavenport
Woot! Ember to the rescue
Rob Norris
@tpolecat
Do you have a sense for how close it is to being ready for prime time?
Works fine in my dinky experiment.
Christopher Davenport
@ChristopherDavenport
The client is pretty ok, there seems to be some issues with chunked encoding I haven’t pinned down. The server connection reuse is the part I have horribly wrong presently.
For most use cases the client as written is probably good to go.
I put a lot of work into that pool, so it should be mostly useful. :laughing:
Rob Norris
@tpolecat
Neato.
In the meantime blaze and async-http can hang their heads in shame.
We need to rename it CursedMinusTwoConcurrentEffectOfSuffering
Christopher Davenport
@ChristopherDavenport
Catchy name for a client.
Rob Norris
@tpolecat
I should quit while I'm ahead and turn the computer off.
Christopher Davenport
@ChristopherDavenport
That’s the spirit!
I’ll try to cut a release tonight, I want to remove server connection reuse temporarily as I don’t like having broken code in the mainline.
Rob Norris
@tpolecat
I didn't look at the server part. It's possible that can be weakened too.
Christopher Davenport
@ChristopherDavenport
Already took care of it. :smile:
If ember doesn’t suit your needs let me know and I’ll do my best, either here or in ChristopherDavenport/libraries
Rob Norris
@tpolecat
:+1:
Christopher Davenport
@ChristopherDavenport
Bits are migrating now, so you can rely on a real artifact.
Rob Norris
@tpolecat
No worries, it's just a throwaway thing right now.
Just trying to get distributed tracing to actually distribute. It works, so I'm good.
Christopher Davenport
@ChristopherDavenport
I'm excited, it's the only client that doesn't require effect, which means pure throughout.
Rob Norris
@tpolecat
Right. Skunk too, for the same reason.
Carlos Quiroz
@cquiroz
Could you explain that a bit for newbies
Do you mean the Effect type class?