34得票1回答
如何修复Spray中SSL连接已关闭但仍出现“Dropping Close”错误

我正在调用一个API,但大部分时间都会出现错误:“Dropping Close since the SSL connection is already closing”和“Premature connection close (the server doesn't appear to supp...

15得票2回答
如何模拟Spray-Client的响应

我有一个简单的喷雾客户端: val pipeline = sendReceive ~> unmarshal[GoogleApiResult[Elevation]] val responseFuture = pipeline {Get("http://maps.googleapis.c...

14得票1回答
无法找到隐式的ExecutionContext。您可以传递 spray scala。

我有两个错误: Error:(39, 20) Cannot find an implicit ExecutionContext. You might pass an (implicit ec: ExecutionContext) parameter to your method or imp...

10得票2回答
在Akka/Spray上限制HTTP请求

我正在使用Scala中的Akka actors从外部服务下载资源(HTTP GET请求)。外部服务的响应是JSON格式,并且我必须使用分页(提供程序非常慢)。我想要在10个线程中并发地下载所有分页结果。我使用这样的URL来下载数据块:http://service.com/itmes?limit...

10得票2回答
我能否在特定管道请求上设置超时和重试次数?

使用 Spray 的 pipelining 来发送 HTTP 请求的示例代码如下:val urlpipeline = sendReceive ~> unmarshal[String] urlpipeline { Get(url) } 有没有一种方法可以为特定请求指定超时时间和重试次数?我...