我在Java中有一个put注释
@PUT
@Path("create-user")
public Response createCor(@QueryParam("cor_id") String cor_id,
@QueryParam("bill") String bill
)
{
if (StringHelper.isEmptyOrWhitespace(cor_id) ||
StringHelper.isEmptyOrWhitespace(bill)){
and so on...
当我请求
http://[ip-address]:[port]/api/example/create-user?cor_id=1&bill=12/
我得到一个错误。屏幕截图中的错误示例
答案 0 :(得分:1)
默认情况下,您使用的是GET方法来请求该网址
您只能使用邮递员
等工具来测试其他方法
使用邮递员发出请求:
https://i.stack.imgur.com/9mkCT.png