@POST在泽西可见

时间:2010-12-11 01:13:16

标签: jersey

使用@POST方法在Jersey Viewable上的任何示例?

1 个答案:

答案 0 :(得分:5)

@POST
@Path("register")
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
public Response register(RegisterRequest request) throws Exception {
    HashMap<String, Object> model = new HashMap<String, Object>();
    model.put("request", request);
    return Response.ok(new Viewable("/register", model)).build();
}