spray Questions

2

Solved

I have been trying to learn to run a sbt project in docker. I also want to use spray. I am following the example provided by sbt-docker in github: https://github.com/marcuslonnberg/sbt-docker/tree...
Gunderson asked 20/12, 2015 at 19:1

2

Solved

I'm trying (and failing) to get my head around how spray-json converts json feeds into objects. If I have a simple key -> value json feed then it seems to work ok but the data I want to read comes ...
Outherod asked 15/2, 2015 at 19:8

2

Solved

I guess that i don't understand the workflow correctly. I'm writing a web service in Scala with Apache Shiro and Stormpath. My user authentication process looks like this: 1) Get user data from PO...
Quintic asked 23/7, 2013 at 10:46

2

I'm new to asynchronous programming. I read this tutorial http://danielwestheide.com/blog/2013/01/09/the-neophytes-guide-to-scala-part-8-welcome-to-the-future.html and was surprised by how effortle...
Mccallister asked 13/7, 2014 at 19:18

2

I've a problem about unmarshalling objects to Json via using spray - akka. When i'd like to use actors that returns Future[List[Person]] , it doesn't work. If i use dao object directly, it works....
Lubow asked 22/11, 2015 at 19:21

1

Solved

I'm using spray-json to serialize an object tree, which is based on a class hierarchy such as this: trait Base { val _id: Long } case class Person(_id: Long, firstName: String, lastName: String)...
Apron asked 20/11, 2014 at 20:6

3

Solved

I want to implement a simple json REST server using spray in scala that supports the following routes: GET /foo => return a list of case class objects in json format POST /bar => read a json...
Inure asked 6/6, 2014 at 23:29

3

Solved

I haven't found a solid example or structure to splitting up Spray.io routes into multiple files. I am finding that the current structure of my routes are going to become very cumbersome, and it wo...
Chromogen asked 1/2, 2013 at 19:22

3

Solved

I'm really new with all this Scala/Spray. With some testing I was able to get parameters from a Get request using the parameters function. However I'm trying to fetch some parameters sent from a PO...
Exoenzyme asked 14/10, 2011 at 15:21

1

Solved

I have the following code which uses spray-json to deserialise some JSON into a case class, via the parseJson method. Depending on where the implicit JsonFormat[MyCaseClass] is defined (in-line o...
Brassiere asked 7/9, 2015 at 12:26

1

Solved

I've a route as follows: val route = { logRequestResult("user-service") { pathPrefix("user") { get { respondWithHeader(RawHeader("Content-Type", "application/json")) { parameters("firstName"....
Cosetta asked 7/9, 2015 at 4:18

2

Solved

I have this case class case class Person(val name: String) object JsonImplicits extends DefaultJsonProtocol { implicit val impPerson = jsonFormat1(Person) } I'm trying spray-json in order to p...
Acclaim asked 5/1, 2014 at 9:57

2

Solved

One of the features of Akka HTTP (formally known as Spray) is its ability to automagically marshal and unmarshal data back and forth from json into case classes, etc. I've had success at getting th...
Adams asked 10/8, 2015 at 21:55

3

Solved

I'm using spray-json to marshal lists of custom objects into JSON. I have the following case class and its JsonProtocol. case class ElementResponse(name: String, symbol: String, code: String, pkwi...
Rackrent asked 18/7, 2013 at 21:42

3

Solved

I'm create a number of json messages for spray in scala using case classes. For example: case class Foo(name: String, attrs: List[String]) implicit val fooFormat = jsonFormat2(Foo) object Foo {...
Bhili asked 17/6, 2014 at 21:29

1

Solved

I want to be able to make concurrent requests to multiple data repositories and consolidate the results. I am trying to understand if my approach is at all valid or if there is a better way to appr...
Criminal asked 17/6, 2015 at 14:56

1

Solved

I'm looking at the code of "Akka and Spray" tutorial in Typesafe's Activator, written by eigengo. I do not get where jsonFormat1, jsonFormat2, ... jsonFormatN is defined and how it does what it doe...
Tl asked 1/6, 2015 at 3:43

3

I try to simplify validation process for serving responses for HTTP requests in Spray (I use Slick for database access). Currently, I check in one query if I should go further to the following quer...
Eckstein asked 25/2, 2015 at 12:16

1

Solved

I am calling an Actor using the ask pattern within a Spray application, and returning the result as the HTTP response. I map failures from the actor to a custom error code. val authActor = context...
Latricialatrina asked 22/4, 2015 at 10:18

2

Solved

I tried a simple spray example app and i cannot access the route, I uploaded the example source code which does not work to github: spray-tomcat-example: git clone https://github.com/avidanyum/sp...
Poise asked 17/4, 2015 at 14:9

2

Solved

When I'm using Spray.io to develop a RESTful API, how should I structure my application? I already saw this answer on how to split a Spray application, but I'm not satisfied with it, since it does...
Peele asked 15/5, 2014 at 21:32

2

I am using Spray 1.3, Akka 2.3, and Scala 2.11 on Mac 10.9.4 to set up an HTTP server. I am following the Ch. 2 example in Manning's Akka in Action (sample code available here: https://github.com/R...
Idiotism asked 15/9, 2014 at 17:55

0

Is there is already a tool or library which would support reversible (e.g. up and down) database migrations and could be used together with Spray framework? (And Scala, obviously) So far, we...
Unwilling asked 25/2, 2015 at 23:42

1

Solved

is it possible in Akka (scala) to get a reference to an existing ActorSystem? I am working on a Spray application with another Actor for DB. I am also extending Directives to have an object per pa...
Crossstitch asked 8/2, 2015 at 22:12

1

I am working on the akka-http(akka-http-experimental_2.11 - 0.4) for an experimental project. and I have not worked on Spray before. I would like to stream an mp4 video(size can vary) to browser. ...
Desmond asked 21/8, 2014 at 12:15

© 2022 - 2024 — McMap. All rights reserved.