我想使用这段代码来接收带有值的http链接:
@PostMapping(value = "/v1/notification")
public String handleNotifications(@RequestParam("notification") String itemid) {
// parse here the values
return "result successful result";
}
如何返回HTTP状态码200
表示成功的响应?
例如,如果在代码处理过程中存在代码异常,如何返回错误404
?
如何返回HTTP状态码200
表示成功的响应?
例如,如果在代码处理过程中存在代码异常,如何返回错误404
?