Questions tagged [akka-http]

The purpose of the Akka HTTP layer is to expose Actors to the web via HTTP and to enable them to consume HTTP services as a client. It is not an HTTP framework, it is an Actor-based toolkit for interacting with web services and clients.

The purpose of the Akka HTTP layer is to expose Actors to the web via HTTP and to enable them to consume HTTP services as a client. It is not an HTTP framework, it is an Actor-based toolkit for interacting with web services and clients.

More Info:

1489 questions
0
votes
1 answer

Why does my route not recognize my protocol

I've noticed while trying to write a jsonProtocol for my case classes that I get errors with nested case classes. Whereas, if I decouple the case classes and just create one giant case class, with all the fields, it will work fine. case class…
0
votes
1 answer

What are the components of a unmarshaller that can unmarshal a http entity to a Map[String, AnyRef]

I struggled to create a unmarshaller that can make a Map[String, AnyRef] out of an httpEntity, So that the flowing route definition will work path("cedt" / "processRow3") { post { entity(as[java.util.Map[String, AnyRef]]) { rowobj =>…
Origin Jing
  • 109
  • 12
0
votes
0 answers

Akka http: Is it possible to use protostuff in akka-http marshalling and unmarshalling

I need to transfer instances of a class with a single field which is a Map[String, AnyRef] over wire. And I have issues to construct marshaller and unmarshaller to do the work, However I can serialize and deserialize instances of the class using…
Origin Jing
  • 109
  • 12
0
votes
0 answers

Akka-Http Json Marshalling and Support Issue

Since I'm new to Akka-HTTP, I tried to implement JSON in Akka-HTTP using Marshalling and get POST data from client. But the code is generating error: The request content was malformed: Unexpected end-of-input at input index 0 (line 1, position 1),…
Sujit Baniya
  • 895
  • 9
  • 27
0
votes
1 answer

Akka HTTP flow not stopping when exception thrown

I'm trying to use Akka HTTP for POSTing to a webserver. If a POST fails I would like it to stop and not send more POSTs as they are not idempotent. The code below creates POSTs and sends them to a test web server. It throws an exception on the first…
David
  • 1,862
  • 2
  • 22
  • 35
0
votes
1 answer

Terminate Akka-Http Web Socket connection asynchronously

Web Socket connections in Akka Http are treated as an Akka Streams Flow. This seems like it works great for basic request-reply, but it gets more complex when messages should also be pushed out over the websocket. The core of my server looks kind of…
acjay
  • 34,571
  • 6
  • 57
  • 100
0
votes
3 answers

Error running akka-http-microservice Activator template

Error running akka-http-microservice Activator template Unable to run example template: akka-http-microservice from the Activator Project builds, but on running, unable to access URL, http://localhost:9000/ip/8.8.8.8 getting 'Internal Server…
Dagny T
  • 31
  • 5
0
votes
2 answers

Convert Route to Flow in Akka-Http for Java

Is there a way to convert javadsl Route to Flow? In Scala we have handlerFlow available implicitly, but in Java we have no analogues. Tried to call handlerFlow, but it uses scaladsl types and incompatible with javadsl version of Route. I want to use…
EuDgee
  • 13
  • 5
0
votes
1 answer

Spray reverse proxy: keep transferring data after client has disconnected

I'm trying to implement a reverse HTTP proxy with Spray/Akka, but runs into trouble. I found that under some circumstances, my proxy server will keep receivving data from upstream server even after the client has disconnected. Here's how I…
平芜泫
  • 91
  • 4
0
votes
1 answer

Akka HTTP "actor per request" pattern

Currently I'm trying to implement the "actor-per-request" pattern proposed by NET-A-PORTER devs in Akka HTTP. The problem I'm facing is that this pattern is not documented anywhere in the docs. There doesn't seem to be a way to do the…
giannoug
  • 643
  • 3
  • 8
  • 20
0
votes
0 answers

Should akka http try to end an incoming HTTP POST request which has specified Expect: 100-continue where there is any backpressure in the system?

I'm getting some unexpected behaviour in an akka http endpoint when a client sends an "Expect: 100-continue" header as part of a post request where the request causes backpressure in the system. The following (contrived) endpoint is the simplest way…
Steve Willcock
  • 26,111
  • 4
  • 43
  • 40
0
votes
1 answer

Akka Http HTTPS configuration causing Chrome to return ERR_SSL_VERSION_OR_CIPHER_MISMATCH

I am trying to get secure connection to work on my akka-http server (localhost) using a self-signed certificate. I have not been successful. The Akka-http docs on ssl is a little vague. I have tried to gather bits and pieces of information from all…
fintis
  • 3
  • 3
0
votes
1 answer

How to use Framing with akka websocket

I am new to akka-stream and I am trying to use the Framing.lengthField with websocket https://github.com/akka/akka/blob/master/akka-stream/src/main/scala/akka/stream/scaladsl/Framing.scala Here is what I have: path("websocket") { …
ydemartino
  • 242
  • 5
  • 10
0
votes
1 answer

Why akka http is not emiting responses for first N requests?

I'm trying to use akka-http in order to make http requests to a single host (e.g. "akka.io"). The problem is that the created flow (Http().cachedHostConnectionPool) starts emitting responses only after N http requests are made, where N is equal to…
uladzimir
  • 3
  • 2
0
votes
2 answers

akka-http not showing metrics in NewRelic

I'm trying to monitor my akka-http Rest web-service with NewRelic The application has only one GET url (defined with akka-http) I have the following configuration in the plugins.sbt logLevel := Level.Warn addSbtPlugin("com.typesafe.sbt" %…
George C
  • 1,168
  • 13
  • 30