More documentation on how to use unmarshalling (with circe)
Closed this issue · 2 comments
akauppi commented
First, I really like the project. Thanks!!!
But I have found the documentation being biased towards server use (marshalling), though the README clearly mentions also unmarshalling.
What seems to work for me is (RequirementIn
is a case class with @JsonCodec
annotation):
val fut: Future[RequirementIn] = Http().singleRequest(HttpRequest(uri = uri)).flatMap(Unmarshal(_).to[RequirementIn])
- Is this the right / best way to do it?
- Where could such be mentioned in the documentation?
Scala 2.12.4
akka-http 10.0.10
circe 0.8.0
akka-http-circe 1.18.0
akauppi commented
Made a StackOverflow entry about this.
hseeberger commented
That looks good.