【发布时间】:2015-09-08 12:30:43
【问题描述】:
在java RESTfull服务中,我可以在同一路径中定义两个方法,通过http调用方法来区分。
EG:第一种方法使用 GET,第二种方法使用 POST
@GET
@Produces("application/pdf")
public Response getFile(@Context HttpServletRequest req,@PathParam("search") final String search,Map<Object, Object> input) {
....}
@Post
@Produces("application/pdf")
public Response getFile(@Context HttpServletRequest req,@PathParam("search") final String search) {
....}
【问题讨论】:
标签: java rest restful-url restful-architecture