方式一:
@RequestMapping(value = "/", method = RequestMethod.PUT) public ReturnInfo modifyIsSMSPushedByUserId(@ApiParam("用户ID") @RequestParam Integer userId, @ApiParam("SMS状态(0或1)") @RequestParam Integer sms){ }
方式二:
@RequestMapping(value = "/", method = RequestMethod.PUT) public ReturnInfo modifyIsSMSPushedByUserId(@RequestBody EulerAppUserSetting setting){ }
appid为请求头参数
@RequestMapping(value = "/test_code", method = RequestMethod.GET) public ReturnInfo testCode(@RequestParam(value = "mobile") String mobile, @RequestHeader(name = "appid") String appid)
本文介绍了两种通过 PUT 方法更新用户 SMS 推送状态的 RESTful API 设计方法,并展示了一个包含请求头参数 appid 的 GET 请求示例。
1457

被折叠的 条评论
为什么被折叠?



