WebApi 2基础

一、介绍

WebApi是给前端提供数据的框架

Restful格式的数据提交方式

Post--添加

Get--获取

Put--修改

Delete--删除

 

在地址栏中?代表的是QueryString查询字符串

throw new Exception("错误")--错误信息

 

返回结果

return ok();

return not fond();

return InternalServerError();

posted @ 2019-07-10 16:59  z阿旭  阅读(122)  评论(0编辑  收藏  举报