I get a response, and I want to pass it to another function, such as a JSON object.
I'm not sure I understand your question, but I assume that you want to convert the json that you receive from the WS call before it returns to the client, and that this conversion may take a few lines of code. If this is correct, you just need to add braces around the yield statement so that you can work more on the answer:
def getTasks = Action { Async { val promise = WS.url(getAppProperty("helpdesk.host")).withHeaders( "Accept" -> "application/json", "Authorization" -> "Basic bi5sdWJ5YW5vdjoyMDEzMDcwNDE0NDc=" ).get() for { response <- promise } yield {
source share