参数+动作指定

api/uses/modiy/?


server:

 [HttpPost]
        public HttpResponseMessage Modify(User user)
        {
            int x = 0;
            ReturnResult result = new ReturnResult();
            result.status = ReturnResult.OK;
            var response = Request.CreateResponse(HttpStatusCode.OK, result);
            return response;
        }

client:


post submit

            $.ajax({
                type: "post",
                url: CConfig.URL_STUDENTLOGINCHECK+"users/Modify/?",
                data: JSON.stringify(user),
                dataType: 'json',
               contentType: "application/json",
            
                success: function (result) {
                       console.log(result);
                }
            });

  


get submit


            $.ajax({
                type: "get",
                url: CConfig.URL_STUDENTLOGINCHECK+"users/Modify/?",
                data: "name=xx&&email=xx",            
                success: function (result) {
                       console.log(result);
                }
            });

你可能感兴趣的:(参数+动作指定)