New to Scala to go easy on me!
I'm using spray atm and posting requests in. I'm looking to convert the post data to a case class but it throws an error could not find implicit value for parameter um: spray.httpx.unmarshalling.FromRequestUnmarshaller
. What might I be doing incorrect? The Documentation is a bit confusing.
post {
entity(as[TextMessage]) { txt =>
println(txt.body)
complete("")
}
}
And my Case Class case class TextMessage( body: String, from: String)
From the docs this should work off the bat.
Ideas?
Edit: The data isn't being posted as JSON it's posted as form data i.e. application/x-www-form-urlencoded