REST - complex applications

后端 未结 5 1430
南方客
南方客 2020-12-02 04:06

I\'m struggling to apply RESTful principles to a new web application I\'m working on. In particular, it\'s the idea that to be RESTful, each HTTP request should carry enoug

5条回答
  •  心在旅途
    2020-12-02 04:48

    No all of that does not have to be in every request.

    Each resource (medication, patient history, etc) should have a canonical URI that uniquely identifies it. In some applications (eg, Rails-based ones) this will be something like "/patients/1234" or "/drugs/5678" but the URL format is unimportant.

    A client that has previously obtained the URI for a resource (such as from a search, or from a link embedded in another resource) can retrieve it using this URI.

提交回复
热议问题