spray Questions

2

Solved

I'm trying to make a simple https request using this library https://github.com/scalaj/scalaj-http . The request contains some json data. Here is what I'm doing: val jsonHeaders = """{"jsonrpc":...
Tidewater asked 9/6, 2013 at 6:40

3

Solved

I currently testing a web service, and I keep on running into an error where the web service test is failing because it is timing out. I'm trying to extends that timeout to be 5 seconds long. I'm t...
Shawntashawwal asked 25/8, 2015 at 21:2

3

Short question: Is there a way to ask the scala compiler to tell me where a certain implicit used at a given point in a program was declared ? If not, is there an algorithm that I can follow manu...
Dander asked 29/12, 2016 at 15:14

3

Solved

I am using scala, spray and akka for one of my projects. In Intellij, it is working fine. When I build the project and tried to run it in command line, I get the following error. Caused by: com.typ...
Lawana asked 6/2, 2015 at 11:40

3

Solved

I am trying to return a List from my complete directive in spray-routing. complete { List("hello") } However, I am getting an error - Expression of type List[String] doesn't conform to expecte...
Twopiece asked 18/2, 2015 at 2:43

7

I'm working on a simple test spec using spray and I can't get it to compile correctly, don't know if I'm doing anything wrong. My version of scala is 2.9.3 and spray 1.0.1 (Updating either of them ...
Modica asked 4/2, 2015 at 14:47

3

Solved

In some cases default values make more sense than optionals in case classes: case class Car(numberOfWheels:Int = 4, color:String) case class Car(numbeOfWheels:Option[Int], color:String) //silly ...
Buatti asked 1/4, 2013 at 9:32

4

Solved

I post some data to Server using the following code def post(endpoint: String, entity: Strict) = { Http().singleRequest(HttpRequest(uri = Notifier.notificationUrl + endpoint, method = HttpMethod...
Prouty asked 26/8, 2015 at 17:56

3

Solved

I am looking at headers that are coming in, but no IP seems to be there: HttpRequest(GET,http://127.0.0.1:8080/track/check,List(Accept-Language: uk-UA, uk, ru, en-US, en, Encoding: gzip, deflate,...
Shope asked 27/9, 2013 at 2:0

2

Solved

I understand that if I have: case class Person(name: String) I can use object PersonJsonImplicits extends DefaultJsonProtocol { implicit val impPerson = jsonFormat1(Person) } and thus seria...
Colligan asked 6/1, 2014 at 9:24

4

I'm getting this error when I try to compile a Scala project in sbt. Modules were resolved with conflicting cross-version suffixes in {file:/home/seven3n/caja/Flujo_de_caja/}flujo_de_caja: [error]...
Tribromoethanol asked 12/5, 2014 at 20:7

3

Solved

import akka.actor.Actor import spray.routing.HttpService import spray.http._ import MediaTypes._ import spray.json._ import spray.routing.directives.CachingDirectives._ import spray.httpx.encoding....
Dribble asked 6/8, 2015 at 14:44

3

Solved

I have a case class containing varargs, with an implicit jsonFormat as follows: import spray.json._ case class Colors(name: String*) object MyJsonProtocol extends DefaultJsonProtocol { implicit v...
Greaseball asked 29/1, 2015 at 10:16

3

As a beginner to both scala and akka-http, I am trying to hook into the serialization aka marshalling process. The project uses [email protected] and [email protected]". Furthermore, it ...
Lette asked 11/4, 2018 at 9:42

1

We have a akka application running in production in a non clustered mode ( doesn't akka clustering ). We are trying to dockerize this application and running into an issue. We are using docker hos...
Reservist asked 13/4, 2018 at 15:50

1

I’m making a call to an API, but most of the time I keep getting an error: “Dropping Close since the SSL connection is already closing” and “Premature connection close (the server doesn't appear to...
Prohibit asked 1/4, 2015 at 17:39

1

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. The...
Guyer asked 12/4, 2016 at 14:59

5

Solved

Is there a way and/or library to automatically create Kotlin Data class from Json like it is works in Scala Json.Spray? Something like this: data class User(id: Int, name: String) class DataClas...
Dynamite asked 7/9, 2014 at 14:27

2

I am trying to load test my spray http client based on an actor model using the apache bench tool. The performance is not great. All the more, when I increase the concurrency level to around 200-30...
Cyprio asked 31/3, 2015 at 10:55

3

I was attempting to implement CORS support on a Spray server (version 1.1-20131011 where cors headers are already supported). Currently, the server code looks like this: trait DefaultCORSDirectiv...
Pierson asked 30/4, 2014 at 19:46

1

Scala Execution Context and Dispatchers - Listing and comparison: Why ? There are a lot of questions around what/how/what is the best Execution Context to use to execute futures on in Scala and ho...
Woodsum asked 6/12, 2015 at 12:10

1

Akka HTTP and Spray provide an authenticateOAuth2 directive, but their documentation states that This directive does not implement the complete OAuth2 protocol, but instead enables implementing ...
Alleen asked 5/2, 2016 at 1:42

5

Solved

I'm going to develop new HTTP/REST services using Scala and Akka Actors. I have experience working with Play, but I don't really need a complete web Framework. From what I read, I think Spray is a...
Uredo asked 24/3, 2015 at 9:4

3

Solved

I'm trying to reprocude this or this, but I keep getting an error I am not able to fix... First of all, here are my dependencies: compile 'io.spray:spray-can_2.11:1.3.1' compile 'io.spray:spray-rou...
Hippomenes asked 11/7, 2014 at 19:3

4

Solved

I understand that spray does that for me, but I still want to override it with my header, how can I override the header in the response? My response looks like this: case HttpRequest(GET, Uri.Pat...
Ejection asked 16/10, 2013 at 5:54

© 2022 - 2024 — McMap. All rights reserved.