implicit val errorFormat = jsonFormat1(Error)
implicit object StringFormat extends RootJsonFormat[String] { override def read(json: JsValue): String = json.compactPrint
override def write(obj: String): JsValue = JsString(obj)}
def receive = { case Response(payload) => {
println("payload: " + new String(payload, Charset.forName("UTF-8"))) complete(OK, new String(payload, Charset.forName("UTF-8"))) } case ReceiveTimeout => complete(GatewayTimeout, Error("Request timeout"))}
"{\"metadata\":{\"sourceId\":\"FTP\",\"client\":\"test\",\"timeStamp\":\"2016-03-25T14:47:18.563\"
def complete[T <: AnyRef : RootJsonFormat](status: StatusCode, obj: T) = { r.complete((status, obj)) stop(self)}
--
You received this message because you are subscribed to the Google Groups "spray.io User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spray-user+...@googlegroups.com.
Visit this group at https://groups.google.com/group/spray-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/spray-user/8644eb0e-3b88-4397-8e57-e6c40a4f6361%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.