Skip to content

media_types

qinmingyuan edited this page Dec 15, 2018 · 2 revisions

定义规范如下:

api版本定义在 Request Header Accept 字段中,由以下几部分组成:

  • 固定内容:application/vnd
  • 应用名称:github
  • 版本:格式为v开头加整数;
  • 格式:json
Accept: application/vnd.github.v3+json

ruby 正则定义如下:

/application\/vnd\.github\.v([\d]+)\+json/

参考资料

Clone this wiki locally