【发布时间】:2016-04-08 12:03:43
【问题描述】:
在以下代码中:
def myRequest: WebSocket[JsValue, JsValue] =
WebSocket.acceptWithActor[JsValue, JsValue] { request => out =>
val filtered: Set[Long] = // how to get the request body???
WebSocketActor.props(filtered, out)
}
如何访问请求正文,以便在内容被传递到 Actor 实例之前对其进行一些过滤? Play 框架的文档不是很清楚。有什么建议吗?
【问题讨论】:
标签: scala playframework websocket