2
내 문제는 SimpleResult가 해당 세션에 대한 읽기 액세스를 허용하지 않는 것인데 쓰기 액세스 (withSession) 만 있습니다.스칼라 플레이 : ActionBuilder에서 래핑 된 액션의 결과 세션을 수정할 수 있습니까?
object MyAction extends ActionBuilder[MyRequest] {
def invokeBlock[A](
request: Request[A],
block: (MyRequest[A]) => Future[SimpleResult]
): Future[SimpleResult] = {
// do stuff, create x, y
val resultFuture = block(MyRequest(x, y, request)
// Now I want to modify resultFuture's session,
// keeping any changes block might have done to request.session.
// And I'd rather not parse result's headers by hand to do that.
}
}
무엇이 누락 되었습니까?