API设计风格

1.Tunneling Style(隧道式风格)spring

                对应的Web 服务技术 SOAPide

2.URI Style(通用资源标识符风格)ui

3.Hypermedia Style(超媒体风格).net

示例:设计

{
  "content":"Hello, World!",
  "_links":{
    "self":{
      "href":"http://localhost:8080/greeting?name=World"
    }
  }
}

参考spring guide:Building a Hypermedia-Driven RESTful Web Servicerest

4.Event-Driven Style(事件驱动风格)code

 

参考博文:API设计如龙生九子,Tunneling、Hypermedia等更受开发者青睐事件

相关文章
相关标签/搜索