Skip to content
This repository has been archived by the owner on Dec 30, 2018. It is now read-only.

关于rest api增强式设计的几点建议 #71

Open
hellfiresong opened this issue May 22, 2015 · 1 comment
Open

关于rest api增强式设计的几点建议 #71

hellfiresong opened this issue May 22, 2015 · 1 comment

Comments

@hellfiresong
Copy link

  • 目前jsgen的API没有将API的版本号考虑进去,应该将API的版本号放入URL。例如:http://www.angularjs.cn/api/v1/tag
  • 看了下,目前API中的方法只有GET和POST两种,比较好的rest api设计规范是CRUD对应不同的HTTP动词,比如:GET(SELECT):从服务器取出资源(一项或多项)。POST(CREATE):在服务器新建一个资源。PUT(UPDATE):在服务器更新资源(客户端提供改变后的完整资源)。DELETE(DELETE):从服务器删除资源。
  • CRUD返回的http code对应不同的状态码。
@zensh
Copy link
Owner

zensh commented May 22, 2015

Sorry,不会再更新了,没意义~

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants