1
在java中,RESTfull服務可以通過http調用方法定義兩個相同路徑區分的方法。對@GET和@POST使用相同的路徑
EG:第一種方法使用利用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) {
....}