I have the following piece of code in Scala using Akka HTTP with Spray Routing
import akka.http.scaladsl.server.Directives._
val geoip =
path(RemainingPath) {remaining =>
val response = . . .
complete(response)
}
But the I get the error message
[ERROR] FreeGeoIp.scala:45: error: missing parameter type
[ERROR] path(RemainingPath) {remaining =>
[ERROR] ^
[ERROR] one error found
Where exactly is the parameter type supposed to go?
The documentation on this is VERY poor, and according to the examples this code should work.
path(RemainingPath) {remaining: MyTypeHere =>- Rhys Bradburypath(RemainingPath) {remaining : String =>was my first try, but that does not work either. - Eric Kolotylukdef path[L](pm: PathMatcher[L]): Directive[L] = pathPrefix(pm ~ PathEnd)- Eric Kolotyluk