Akka actor for http request Java
0 Hello I am trying to look for a simple example in AKKA - Java to create a HTTP Client un an Actor. So far I am able to create a request and get the response Http Entity. I need to migrate it to an actor , so I can call multiple actors in parallel with a time out. final ActorSystem system = ActorSystem.create(); final Materializer materializer = ActorMaterializer.create(system); final List<HttpRequest> httpRequests = Arrays.asList( HttpRequest.create(url) // Content-Encoding: gzip in respons ); Unmarshaller<ByteString, BitTweet> unmarshal = Jackson.byteStringUnmarshaller(BitTweet.class); JsonEntityStreamingSupport support = EntityStreamingSupport.json(); final Http http = Http.get(system); final Function<HttpResponse, HttpResponse> decodeResponse = response -> // Pick the right coder final Coder coder; if (HttpEncodings.gzip().equals(response.encoding())) coder = Coder.Gzip; else if (HttpEncodings.deflate().equals(response.encoding()))