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
0 answers

seeking swagger sbt recipe that eliminates need for checking in swagger html/css/img artifacts into source control

I just started poking into how swagger works with akka-http and I got up and running with the typesafe activator example called "Spray-Slick-Swagger Sample". This code is also available here. Since this is an illustrative example I am guessing not…
Chris Bedford
  • 2,560
  • 3
  • 28
  • 60
0
votes
1 answer

Scala Unit Testing using mockito library

I am writing rest test cases in akk-http, I am getting this error in statement when(mockedRepository.getAllFromModule).thenReturn(x).My Class is as below: class GetModulesRestTest extends WordSpec with Matchers with ScalatestRouteTest with…
Aamir
  • 2,380
  • 3
  • 24
  • 54
0
votes
0 answers

Where to define the implicit val formats in a microservice with Scala, akka-http, Json4s?

I am building a microservice using Scala, akka-http, json4s. Also using case classes for my business bean classes. My case classes have scala Enumerations (I researched on the scala Enums and aware of the limitations, but this perfectly suits my…
Phani
  • 1,851
  • 2
  • 15
  • 28
0
votes
1 answer

Incorrect rejection is sent to the client

I have unauthenticated routes and authenticated routes in my Akka/Spray DSL. Below is simplified version of the code val nakedRoutes = pathPrefix("user") { post { entity(as[UserNew]) { user => …
expert
  • 29,290
  • 30
  • 110
  • 214
0
votes
1 answer

How can I make use of top level ActorSystem everywhere needed?

I am trying to learn akka-http and working on their example Here is what my code looks like val system = ActorSystem.create("enterpriseSystem", ConfigFactory.load("application")) val notifier = system.actorOf(Props[Notifier], "notifier") and…
daydreamer
  • 87,243
  • 191
  • 450
  • 722
0
votes
1 answer

Akka-HTTP route not found?

I am learning to build server using Akka-Http and this is what I have written so far import akka.actor.ActorSystem import akka.http.scaladsl.Http import akka.http.scaladsl.server.Directives._ import akka.stream.{Materializer,…
daydreamer
  • 87,243
  • 191
  • 450
  • 722
0
votes
1 answer

New to akka-http

I am new to akka-http. I am using this in my project. I am not able to understand what exactly marshalling and unmarshalling is. If someone can explain it with a brief example showing how to marshall and unmarshall json.
0
votes
1 answer

Akka-http process requests with Stream

I try write some simple akka-http and akka-streams based application, that handle http requests, always with one precompiled stream, because I plan to use long time processing with back-pressure in my requestProcessor stream My application…
-1
votes
0 answers

How to expose the prometheus matrix for each incoming request in akka-http

like to know how to make count metrics available for incoming http requests in akka-http. Basically, I'm looking for wrappers for each http endpoint so that I can build metrics for the amount of time it took for each request to complete as well as…
munish
  • 1
-1
votes
2 answers

Akka: custom HttpHeader, convert HashMap to Iterable in java

I'm trying to generate custom HttpHeader in akka. I've a HashMap of header entries which I need to convert to Iterable. Here's my code: import akka.http.javadsl.model.HttpHeader; HashMap headersMap = new…
Dookoto_Sea
  • 521
  • 1
  • 5
  • 16
-1
votes
2 answers

Convert java springboot code into scala akka http

I want to convert my REST Api code which is written with java spring boot in to scala akka http ,is there any online converter available for this?
-1
votes
2 answers

CORS issue / akka-http-cors / No 'Access-Control-Allow-Origin' header is present on the requested resource in Scala/Java

How do I implement akka-http-cors correctly to be able to allow access from any origin (domain, in my case localhost:3000) to a Https Server (Scala/Akka)? Based on the akka-http-cors documentation should defaultSettings do the job, but I am still…
MJey
  • 345
  • 3
  • 16
-1
votes
1 answer

Getting 503 service unavailable after 30 sec on browser console - React App

I am getting 503 after exactly 30 sec while exporting all user data from react app. export const get = ( url: string, queryParams: Object = {}, extraHeaders: Object = {}, responseType: string = 'text', callback?: number => void ):…
-1
votes
1 answer

Partial unmarshelling

Let us say that when I get an HTTP JSON response, I am only interested in some of the JSON fields returned, but not all of them. Is there a way to unmarshal only some of the fields into my object?
-1
votes
1 answer

getting connection refused from docker containers in a same docker compose

i have an akka http application and one keycloak docker container i used sbt native docker plugin to create a an image of my app and then i wrote a docker compose file but my app container is not discovering keycloak container here is my build.sbt…
swaheed
  • 3,671
  • 10
  • 42
  • 103