简体   繁体   English

任何反应式HTTP Scala客户端?

[英]Any reactive HTTP Scala client?

Is there any really reactive Scala Http client except play's ? 除了play's之外,是否还有任何真正的反应式Scala Http客户端? By word reactive I mean ability to consume response data in chunks with all that non-blocking goodies on handling that portions of data. 我所说的“ 反应性”是指能够在处理数据的那部分时,将所有具有非阻塞优点的响应数据分块消费。

What about spray ? 喷雾呢? Minimal dependencies and non-blocking data processing with Akka. 最小的依赖关系和使用Akka的无阻塞数据处理。 Look at example . 例子 Also there are some chunked samples in scala-spray-examples on github. 在github上的scala-spray-examples中也有一些分块的样本。

Play(2.5) is built on top of Netty . Play(2.5)建立在Netty之上。 I would suggest spray as well but spray is no longer maintained and has been superseded by Akka HTTP. 我也建议使用Spray,但不再维护Spray,它已被Akka HTTP取代。 So, II would suggest you use Akka HTTP or Play. 因此,II建议您使用Akka HTTP或Play。 I have to say though, Play is currently working on integrating with Akka HTTP and they currently have an experimental version ready. 我不得不说,Play目前正在与Akka HTTP集成,并且它们目前已经准备好实验版本。

If you want to use a standalone reactive http scala client, try Akka HTTP : http://doc.akka.io/docs/akka-http/current/scala/http/ 如果要使用独立的响应式HTTP Scala客户端,请尝试Akka HTTP: http : //doc.akka.io/docs/akka-http/current/scala/http/

The upside of using play, even though it brings in a lot of dependencies, they have a really good test framework for the HTTP side. 使用play的好处是,尽管它带来了很多依赖性,但它们具有一个非常好的HTTP框架测试框架。 I would suggest you look at the play documentation, as you will realize you won't need much outside of what they already have. 我建议您看一下播放文档,因为您会发现他们已经没有什么了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM