REST services and multiple representations of same object with different fields

后端 未结 4 1958

Let\'s say you have an Person object, with several fields like first_name, last_name, age which are relatively small, and

4条回答
  •  借酒劲吻你
    2020-12-10 18:57

    OData protocol provide a very comprehensive RESTful API. The common way to do CRUD (Create, Retrieve, Update, Delete) is done by POST, GET, PUT, and DELETE respectively.

    Request for partial resource is done by adding select query:

    api/Person?$select=first_name,last_name,age
    

提交回复
热议问题