Simple and concise HTTP client library for Scala

后端 未结 11 1836
梦如初夏
梦如初夏 2020-12-12 20:26

I need a mature HTTP client library that is idiomatic to scala, concise in usage, simple semantics. I looked at the Apache HTTP and the Scala Dispatch and numerous new libra

11条回答
  •  隐瞒了意图╮
    2020-12-12 20:54

    Spray

    You really should consider using Spray. In my opinion it has a bit of tricky syntax, but it is still pretty usable if you aim to build a high-performance http client. The main advantage of using Spray is that it is based on the akka actor library, which is extremely scalable and powerful. You can scale out your http client to several machines by only changing conf files.

    Moreover few month ago Spray join Typesafe, and as I understand it will become a part of the basic akka distribution. proof

    Play2

    Another option is the Play2 WS lib usage (doc). As far as I know it is still not separated from the Play distribution, but due to its extremely simplicity it is worth it to spend some time attaching the whole Play framework to get that part. There are some issues with providing configuration to it, so this is not great for drop-and-use cases. However, we have used it in few non Play-based projects and everything was fine.

提交回复
热议问题