Url parsing error - restCall


(Akhil) #1

Hi,

I am new to lagom. Created a lagom scala project from https://developer.lightbend.com/start/?group=lagom&project=lagom-scala-sbt url. I tried adding one restcall as follow:

restCall(Method.GET,"api/something/:id", getSomthing _)

but while running I am getting below error:

18:51:52.019 [info] akka.event.slf4j.Slf4jLogger [] - Slf4jLogger started
java.lang.IllegalArgumentException: Error parsing api/something/:id: `/' expected but `a' found

Not able to figure out what's wrong with the code. 

Thanks.


(Ignasi Marimon-Clos) #2

I think it should look like:

restCall(Method.GET,"/api/something/:id", getSomthing _)

Note the extra / before api on the path.

Cheers,


(Akhil) #3

Thanks.
It worked.