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

How to change log level in Akka-Http with Phantom

I have a new project with Akka-http 2.4.2 and com.websudos.phantom 1.22.0 All works fine but I don't know how to change the log level to INFO so the DEBUG logs of phantom like: 17:00:51.792 [cluster1-nio-worker-0] DEBUG …
George C
  • 1,168
  • 13
  • 30
0
votes
1 answer

Generic REST client in Scala

I'm a bit new to Scala and I'm trying to write a generic client for a RESTful api I would like to use. I'm able to provide concrete Reads[T] and Writes[T] for the specific case classes I would like to instantiate my client for, however the compiler…
Rag
  • 195
  • 1
  • 13
0
votes
1 answer

With play and akka-https: How to properly chain multiple requests to the incoming request to create a response?

So I tried to get a small play app communicating with another rest service. The idea is, to receive a request on the play side and then do a request to the rest api and feed parts of the result to another local actor before displaying the response…
rincewind
  • 623
  • 6
  • 13
0
votes
1 answer

spray-json: could not find implicit value for FromRequestUnmarshallar

I'm creating my first application with AKKA-http. I'm currently using spray-json to write object to json. When I created GET request everything is working fine, but I tried a POST request and the following error shows: Error:(55, 26) could not find…
Corne Elshof
  • 199
  • 3
  • 9
0
votes
2 answers

where is the implicit being supplied from when i invoke akka.http.scaladsl.Http.apply()?

I am using Akka HTTP for REST support, and I need to use Actors in another part of the server I'm developing. My understanding is that one typically needs to use exactly ONE ActorSystem instance throughout one's application. From the definition…
Chris Bedford
  • 2,560
  • 3
  • 28
  • 60
0
votes
1 answer

Getting "dead letters encountered" using spray client

I'm writing simple spray client code: // ActorSystem("main-actor-system") initialized earlier in code implicit val system = actorSystem implicit val execctx: scala.concurrent.ExecutionContext = system.dispatcher implicit val timeout =…
Julias
  • 5,752
  • 17
  • 59
  • 84
0
votes
1 answer

Scala, Spray - Unmarshalling to List[Int]

I'm trying to get list of ints [1,2,3,...] from JSON api but I see conversion to generic type isn't working and Spray documentation is only showing unmarshalling to specific object. Any ideas how to make it work / what to google to get my…
0
votes
1 answer

Akka-stream and delegating processing to an actor

I have the following case, where I'm trying to delegate processing to an actor. What I want to happen is that whenever my flow processes a message, it sends it to the actor, and the actor will uppercase it and write it to the stream as a response.…
Will I Am
  • 2,614
  • 3
  • 35
  • 61
0
votes
1 answer

Akka HTTP path matching - pathEndOrSingleSlash seems not to match

An endpoint should echo a part of the request path. There are two variants of the request: /xyz-/ /xyz-.txt The token part is what I would like to extract. However, I am only able to match the second variant and not the…
kostja
  • 60,521
  • 48
  • 179
  • 224
0
votes
1 answer

POST request sometimes hits the wrong endpoint in Akka-http program

I have an Akka-http 2 server to handle HTTP requests. On either endpoint, I'm converting to case class A or B: case class caseClassA(data: String, eventID: String) case class caseClassB(data: String, otherData: JsObject) I have a routes object…
olympia
  • 362
  • 2
  • 20
0
votes
1 answer

How to restrict the akka actor to do one job at a time

I have an Java-Akka based application where one Akka actor tells another Akka actor to do a certain jobs and it starts doing the job in the command prompt but If I gave him 10 jobs it starts all the jobs at a time in 10 command prompt. If i'll be…
amit kaushik
  • 79
  • 2
  • 9
0
votes
1 answer

Difference between scala.concurrent.onComplete and akka.http.scaladsl.server.directives.onComplete

In scala concurrent package, there is onComplete method which returns nothing while in akka-http directives, it returns the Directive1. Is that the only difference? I sometimes got confused on those two methods.
0
votes
1 answer

Akka-http merge incoming connections

I'm trying to use akka-streams and akka-http in order to solve the following problem: we have 2 http clients (A and B) sending requests to 1 http server (C). Both side use akka-http to communicate. requests from A have higher priority compared to…
d-n-ust
  • 122
  • 1
  • 9
0
votes
0 answers

How to use Spray JSON serializer in abstract way?

Any idea why this code doesn't work? I'm trying to have serialize method to all my exceptions to avoid the need for pattern matching for every exception. With the code below, I just need to case ex:MarshallableException => ex.serialize The below…
Mutaz
  • 547
  • 4
  • 12
0
votes
1 answer

Web browser viewing of a chunked http entity data stream

Based on the techinque described at this question I have written a basic microservice to provide continuously streaming ByteStrings using akka-http. The pertinent scala code being: import akka.actor.ActorSystem import…
Ramón J Romero y Vigil
  • 17,373
  • 7
  • 77
  • 125