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
4
votes
1 answer

How to get html, css and js all in one get with akka http?

I'm trying to serve my html, css and js with akka http: path("") { get { getFromResourceDirectory("home") complete(HttpEntity(ContentTypes.`text/html(UTF-8)`, home.render().toString())) } } home.render() is a twirl template that…
CommonSenseCode
  • 23,522
  • 33
  • 131
  • 186
4
votes
1 answer

how to avoid HTTP status code: 503

I tried to access the rest api call URLSession in the swift and server side AKKA framework used. I am getting 503 error frequently. I have searched lot thing and most of result says it's server side issue. I have tested in postman and JMeter…
kathiravan
  • 41
  • 1
  • 4
4
votes
3 answers

Conflicting Akka versions when using Akka / Akka Streams / Akka HTTP

I'm trying to build a project using Scala 2.12.3, sbt 0.13.6, and the following library dependencies in my build.sbt file: libraryDependencies ++= Seq( "com.typesafe.akka" %% "akka-actor" % "2.5.4", "com.typesafe.akka" %% "akka-stream" %…
Timothy Perrigo
  • 723
  • 4
  • 18
4
votes
1 answer

Scala Akka HTTP casting parameter as java.time.ZonedDateTime

I'm working on a REST service using Akka HTTP (in Scala). I would like a parameter that is passed in to a http get request to be converted to the ZonedDateTime type. The code works fine if I try to use String or Int but fails with a ZonedDateTime…
archeezee
  • 411
  • 1
  • 4
  • 17
4
votes
1 answer

akka client http blocked after max-open-requests

I take this simple example from the akka http doc: http://doc.akka.io/docs/akka-http/current/scala/http/client-side/request-level.html And I modify it a bit to ask for one hundred requests. The application blocks after 32 requests (the default…
David Portabella
  • 12,390
  • 27
  • 101
  • 182
4
votes
1 answer

Definition of Akka HTTP client-side websocket streams

I've successfully used Akka Streams in the past, however, I'm currently having a hard time to understand why client-side Websocket Streams in Akka-HTTP are defined and work as it is shown in the documentation. Since a WebSocket connection allows…
ceran
  • 1,392
  • 1
  • 17
  • 43
4
votes
0 answers

Mongo scala driver 2.0 with non default akka execution context

I have started using mongo scala driver in our scala akka-http project and it has been great help especially the case class support in v2.0.0 is very nifty. I'm trying to wrap my head around how to use the mongo scala driver with non-default…
makeyourrules
  • 63
  • 1
  • 6
4
votes
2 answers

SSL-Config or SSLContext to be used ? in Akka Http SSL Java

I am using my SSL Certificate from third Party - I created a .p12 keystore using following command openssl pkcs12 -export -CAfile Geotrust_EV_Intermediate_Bundle.crt -in www_domainName_in.crt -inkey domainName.in.key -out wtkeystore1.p12 -name…
Abdeali Chandanwala
  • 8,449
  • 6
  • 31
  • 45
4
votes
2 answers

Deployment of akka-http app with frontend app

I want to figure out how the akka-http should be deployed with appropriate frontend app. Let's assume that we have akka-http application which provides some API. It's located in repo A. For this server side app we have frontend app (Angular or REACT…
Alex Fruzenshtein
  • 2,846
  • 6
  • 32
  • 53
4
votes
1 answer

Akka Stream use HttpResponse in Flow

I would like to utilize a simple Flow to gather some extra data from a http service and enhance my data object with the results. The following illustrates the Idea: val httpClient = Http().superPool[User]() val cityRequest = Flow[User].map {…
laidback
  • 545
  • 4
  • 16
4
votes
1 answer

akka http - How to add json data to post request?

I am querying a search api and I need to add the query params in json as body to a post request. val headers: scala.collection.immutable.Seq[HttpHeader] = scala.collection.immutable.Seq( RawHeader("accept", "application/json"), …
An Illusion
  • 769
  • 1
  • 10
  • 24
4
votes
1 answer

Akka HTTP Code/Structural Patterns

I am just starting with Akka Http (and Scala) and was wondering if there are any well-defined patterns for structuring Akka code. In particular, I am looking for structural patterns for composing/aggregating routes dynamically. In particular, I'm…
MojoJojo
  • 3,897
  • 4
  • 28
  • 54
4
votes
1 answer

connect Akka HTTP to Akka stream

I would like to build a REST service with Akka HTTP that connect to an existing Sink (with Kafka reactive stream) but I cannot figure out how to chain an HTTP flow to an Akka stream sink... Should I go for the low level Akka HTTP API that use Flows…
vgkowski
  • 519
  • 6
  • 15
4
votes
1 answer

What is an entity in Akka-Http?

I am new to akka-http and building a basic server-client application in scala. The examples I looked at has the object "entity". Can someone please explain the concept underlying and why is it used and how is it useful? post { path("insert") { …
Nagireddy Hanisha
  • 1,290
  • 4
  • 17
  • 39
4
votes
2 answers

Akka Http - How to Unmarshall ResponseEntity to CustomClass?

I am using Akka Http to make requests to a 3rd party API. The responses are "application/json", and I would like to use Akka Http to convert them to a custom case class. I would like to do something like this: val request =…
Johan Anders
  • 43
  • 1
  • 3