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

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

Description

@hellfiresong
  • 目前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对应不同的状态码。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions