REST Content-Type: Should it be based on extension or Accept header?

后端 未结 7 1343
旧时难觅i
旧时难觅i 2020-11-28 22:50

Should the representation(html, xml, json) returned by a RESTful web service be determined by the url or by the Accept HTTP header?

相关标签:
7条回答
  • 2020-11-28 23:35

    There are problems with using content type... I discussed this on my blog http://shouldersofgiants.co.uk/Blog and finally settled on including the representation in the URI as suggested in RESTful Web Services by Richardson and Ruby

    0 讨论(0)
提交回复
热议问题