ajax|ajax post json http https

JS前端

var params={}; params.openid="asdasd"; $.ajax({ async:false, type:"post", contentType : "application/json; charset=UTF-8", //类型必填 url:"https://192.168.0.109:5156/game/ReqData", data:JSON.stringify(params),//转json串或不转 配合后端即可 dataType:"json", success:function(data){ if(data.result=='success'){ alert('修改成功'); }else{ alert('修改失败'); } }, error:function(data){ alert(data.result); }})


【ajax|ajax post json http https】spring boot 后端

@RequestMapping(value = "https://www.it610.com/article/reqData",method = RequestMethod.POST) @ResponseBody public ResponseData get(@RequestBody String reqBody) {




    推荐阅读