Missing paramenter when I use map (Scala) -


i'm having irritating error can't find explanation for. have code here below:

async{   ws.url(url).get().map{ response =>  //response here giving me error.     ok("response: " + (response.json \ "media_count").as[string])   } } 

and gives me error saying:

missing parameter type 

on response.

where should define parameter type? or error saying more specific?

i think using play.libs.ws meant java api.

the ws.url(...).get() ws class returns promise object of type: promise. map function class takes function instance, not same function1 scala. causing compiler error.

if you're working in scala should use play.api.libs.ws.ws meant work scala library. replace import play.libs.ws import play.api.libs.ws.ws in program , error should go away.


Comments

Popular posts from this blog

Winapi c++: DialogBox hangs when breaking a loop -

vb.net - Font adding using PDFsharp -

javascript - jQuery iScroll clickable list elements while retaining scroll? -