无法使用Vert.X 3.0.0中的getBodyAsJson()访​​问请求正文

时间:2015-06-16 04:38:47

标签: http vert.x

我正在使用Vert.x 3.0.0-milestone5来开发示例Web应用程序。就路由而言,一切正常,但我无法使用访问请求参数 routingContext.getBodyAsJson()或  routingContext.getBody()routingContext.getBodyAsString()Here是完整的说明。

1 个答案:

答案 0 :(得分:23)

如果你想使用

router.route().handler(BodyHandler.create());

首先需要添加一个如下所示的正文处理程序:

array.GetLength()