spray Questions

1

Solved

I've a POST Spray route and the request contains a JSON body (content-type "application/json"). I want a way to extract the raw JSON from this request inside my route. For http://host:port/somepa...
Comeau asked 29/1, 2015 at 13:20

2

Here is spray-json example. Here is NullOptions trait. The problem is when I declare a case class say object MyJsonProtocol extends DefaultJsonProtocol { implicit val some: RootJsonFormat[Some] ...
Specification asked 19/1, 2015 at 6:51

2

Solved

I've a bunch of existing REST services (#1 and #2 below) that are running on different endpoints that are used internally only. Now I want to expose some of these REST APIs (API-1 and API-2) extern...
Ailee asked 17/1, 2015 at 0:13

2

Solved

I'm trying to add parboiled2 as a dependency to my project, and follow the Calculator example but it conflicts with spray. My current build.sbt file includes: "io.spray" %% "spray-json" % "1.3.1"...
Aubrette asked 26/12, 2014 at 14:42

1

Solved

So I've been trying to use parboiled2 for the last few weeks now, it is possibly the most difficult dependency to add to a build I have come across in my entire life. My current error is a compile ...
Missilery asked 14/1, 2015 at 11:41

1

Solved

I have the following service: trait PingService extends MyHttpService { val pingRoutes = path("ping") { get { complete("message" -> "pong") } } } MyHttpServiceis a custom class that ext...
Dacey asked 14/1, 2015 at 11:2

2

Solved

I created a service with a RESTful API in ASP.NET, hosted in IIS. Inside this service, I would like to create an actor system with Akka.NET. Upon creating the actor system: var actorSystem = Acto...
Visceral asked 24/12, 2014 at 9:47

1

Solved

I have this route: val routes = pathPrefix("api") { path("ElevationService" / DoubleNumber / DoubleNumber) { (long, lat) => post { requestContext => println(long, lat) } } } This w...
Athamas asked 30/12, 2014 at 15:1

2

Solved

MyService.scala:33: could not find implicit value for parameter eh: spray.routing.ExceptionHandler I have run into a "missing implicit" compilation error using Akka, in spray.io code that makes an...
Rheometer asked 18/6, 2014 at 11:42

4

Solved

Sorry about the vague title...wasn't sure how to characterize this. I've seen/used a certain code construction in Scala for some time but I don't know how it works. It looks like this (example fro...
Hypomania asked 23/8, 2013 at 5:1

1

I want to use Spray to post to a server a multipart form. In particular I want to post an Image. What Im having trouble with is the Marshalling of the File to Multipart. Even though in Spray they ...
Fiora asked 12/6, 2013 at 21:59

4

Solved

I'm testing a REST API, and the code goes like this: Setting up stuff, populating a database using PUSH calls Testing API a Testing API b ... The code is currently in one rather huge FlatSpec: ...
Ferrocyanide asked 3/12, 2014 at 13:21

2

Solved

I have some configuration problem I can't see. I've followed the instructions provided in the latest twirl README, but the html package is undefined according to the compiler. I've included the s...
Lisette asked 19/11, 2014 at 1:20

1

Solved

Can anybody show me an example in spray how to unmarshall POST with content type plain/text ? How to write the route? Thanks!
Thornberry asked 22/11, 2014 at 1:49

1

Solved

Using spray 1.3.2 with akka 2.3.6. (akka is used only for spray). I need to read huge files and for each line make a http request. I read the files line by line with iterator, and for each item mak...
Lylelyles asked 16/11, 2014 at 16:1

1

I looked at spray 1.3.1 testkit documentation but could not find a proper example for what I need below: I have this sample spray 1.3.1 service trait MyService extends HttpServiceActor { def rece...
Damsel asked 14/5, 2014 at 8:13

2

Solved

When using spray's pipelining to make an HTTP request like this: val urlpipeline = sendReceive ~> unmarshal[String] urlpipeline { Get(url) } is there a way to specify a timeout for the reques...
Readable asked 4/9, 2013 at 16:53

1

Solved

I was trying the following POC to check how to get high concurrency implicit def executionContext = context.system.dispatchers.lookup("async-futures-dispatcher") implicit val timeout = 10 second...
Cutoff asked 27/10, 2014 at 18:6

2

Solved

After have used Play! Framework for a while, I'm taking a first look to Spray. I started from a sample I found on GitHub, now I want to modify it but it's not easy for me to get how it works. How ...
Scherman asked 11/10, 2014 at 11:0

1

I'm trying to implement a full development with REST Spray. There is an argument that I have not yet figured out and I have not found documented: how to protect the routes for authentication / auth...
Lindly asked 28/9, 2014 at 9:51

1

Has anyone benchmarked the performances of his/her application in following two combinations? built with spray-servlet and deployed on Tomcat 7 on JVM 7 built with spray-can and deployed as a jar...
Tugman asked 10/10, 2013 at 10:36

2

Note: Unfortunately this question was closed, but I'm trying to maintain it for if someone else comes along with the same question. I've been looking for a good solution to developing a service in...
Spurtle asked 13/1, 2012 at 8:59

1

I am trying to use spray route and want to test it with Spray-TestKit. I am using : - Scala 2.10.3 - Akka 2.3.3 - Spray 1.3.1 I create a trait extending HttpService, where I define a route : trai...
Scrutable asked 16/7, 2014 at 7:50

1

Solved

Here's the code from an example: import spray.routing.SimpleRoutingApp object Main extends App with SimpleRoutingApp { implicit val system = ActorSystem("my-system") startServer(interface = "...
Siriasis asked 30/6, 2014 at 6:20

3

Solved

Set-up: A project I am working on has a pub/sub server with an HTTP interface. Subscription works by accepting server-sent-events. curl -X GET server:port/topics/news which will be pushed when...
Conceivable asked 16/5, 2014 at 19:22

© 2022 - 2024 — McMap. All rights reserved.