Akka http-如何将ResponseEntity解包到CustomClass?

问题描述我正在使用Akkahttp向第三方API发出请求。响应是"APPLICATION/JSON",我想使用Akkahttp将它们转换成一个定制的案例类。我想做这样的事情:valrequest=RequestBuilding.Get("https://service.com/v

发布:2022-10-16 标签:scalaakkaunmarshallingakka-http


如何使用反压溢出策略创建Akka-Http客户端?

问题描述我有未定数量的Akka-http客户端流从http服务下载数据。我使用Akka-http主机级连接池,因为我希望自定义池,因为有长时间运行的请求通过它。因为客户端的数量是未定义的和动态的,所以我不知道如何配置连接池(max-open-request/max-connect

发布:2022-10-16 标签:scalaakkaakka-httpakka-stream


如何优雅地停止必须部署的 akka-http 服务器的参与者系统.

问题描述我刚刚使用akka-http创建了我的第一个rest服务器.问题是我不知道如何部署服务器,以便可以优雅地关闭Actor系统.Ijustcreatedmyfirstrestserverwithakka-http.TheproblemisthatIdonotknowhowto

发布:2022-10-16 标签:scalasbtsbt-native-packagerakka-http


如何在断开连接后清理 akka-http websocket 资源然后重试?

问题描述下面的代码成功建立了一个websocket连接.websockets服务器(也是akk-http)使用Andrew在此处建议的答案故意关闭连接.下面的SinkActor收到一条akka.actor.Status.Failure类型的消息,所以我知道从服务器到客户端的消息流

发布:2022-10-16 标签:akka-httpakka-stream


Akka-http 在一个流中处理来自不同连接的 HttpRequests

问题描述Akka-http文档说:Akka-httpdocumentationsays:除了将绑定在服务器端的套接字视为Source[IncomingConnection]和每个连接作为一个Source[HttpRequest]和Sink[HttpResponse]Apartfr

发布:2022-10-16 标签:scalaakkaakka-httpakka-stream


Akka-http中获取客户端IP

问题描述我正在尝试编写一个AkkaHTTP微服务(akka版本2.4.11,Scala版本2.11.8,在撰写本文时都是最新版本),它知道客户端服务的IP(即远程地址),并且我无法让它工作.IamtryingtowriteanAkkaHTTPmicroservice(akkave

发布:2022-10-16 标签:scaladslakka-http


akka-http 中的连接池使用源队列实现线程安全吗?

问题描述参考下面提到的实现:http://doc.akka.io/docs/akka-http/10.0.5/scala/http/client-side/host-level.htmlvalpoolClientFlow=Http().cachedHostConnectionPo

发布:2022-10-16 标签:connection-poolingscalaakka-httpakka-stream


Akka Http 客户端:自定义标头

问题描述我正在尝试使用Akka-Http来调用RESTurl.我正在关注这个来自akka文档的例子.使用它,我可以拨打其余的电话.但我不知道如何添加自定义请求标头.我尝试使用ModeledCustomHeader,但请求仍然没有标头.这是我的例子.finalclassApiTok

发布:2022-10-16 标签:restscalaakka-http


akka-stream + akka-http 生命周期

问题描述TLDR:当我将传出http请求作为流的一部分时,是按请求具体化一个流(即使用短期流)还是跨请求使用单个流具体化?TLDR:isitbettertomaterializeastreamperrequest(i.e.useshort-livedstreams)ortouse

发布:2022-10-16 标签:scalaakka-httpakka-stream


我应该使用 akka.http.scaladsl.util.FastFuture 而不是 scala.concurrent.Future?

问题描述我应该使用akka.http.scaladsl.util.FastFuture而不是scala.concurrent.Future吗?ShouldIuseakka.http.scaladsl.util.FastFutureinsteadofscala.concurrent

发布:2022-10-16 标签:concurrencyscalareactive-programmingakkaakka-http