Link headers vs link elements for RESTful JSON

后端 未结 5 1597
余生分开走
余生分开走 2021-02-01 04:09

When building a RESTful / hypermedia API with JSON resources, it seems I have two options for specifying the hypermedia relationships between resources.

  1. Embed t

5条回答
  •  盖世英雄少女心
    2021-02-01 04:35

    You can't compress headers. If you have a lot of links. That might make a difference.

    Providing context for a link. Link headers have the anchor attribute, but there is no standardized fragment path syntax so YMMV.

    Off the top of my head I can't think of any other pros/cons.

提交回复
热议问题