How can I get the absolute URL in play 2.2 scala when doing the following:
val promoLink = routes.Promotions.promotionsCategory(DOCID, slug)
//routes file
GET /promotions/:DOCID:/slug controllers.Promotions.promoCat(DOCID, slug)
As it stands I get a "found : play.api.mvc.Call" type mismatch on expecting a string
thanks
I suppose your promoLink should be a
String
containing an URL? Your question sounds a bit unclear.If so then you probably need this:
false
in the.absoluteURL(false)
stands for theisSecure
parameter which will give youhttp
orhttps
url.If you have an implicit request in scope you may omit the last
(request)
part